X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FMiniLoop.pm;h=932d0b9f196c5346f6716f70bbcb20acf10cb9a8;hp=16216dee01587241f811e508078929358e8bd032;hb=a6786ddab559c869f448c1cb963e83faeb5efd40;hpb=5d59cb9859e004df5cde5d83aa7230e621a28b95 diff --git a/lib/Object/Remote/MiniLoop.pm b/lib/Object/Remote/MiniLoop.pm index 16216de..932d0b9 100644 --- a/lib/Object/Remote/MiniLoop.pm +++ b/lib/Object/Remote/MiniLoop.pm @@ -90,7 +90,7 @@ sub unwatch_time { sub _next_timer_expires_delay { my ($self) = @_; my $timers = $self->_timers; - #undef means no timeout, only returns + #undef means no timeout, select only returns #when data is ready - when the system #deadlocks the chatter from the timeout in #select clogs up the logs @@ -103,11 +103,11 @@ sub _next_timer_expires_delay { if ($duration < 0) { $duration = 0; - } elsif (! defined($delay_max)) { - $duration = undef; - } elsif ($duration > $delay_max) { - $duration = $delay_max; + } elsif (defined $delay_max && $duration > $delay_max) { + $duration = $delay_max; } + + log_trace { "returning $duration as select() timeout period" } return $duration; }