X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FRole%2FConnector.pm;h=d5d46d76d10a066c8078ec60313e3a3f439758bf;hp=83bfcea205d2055533c433022ea6138f22254627;hb=9031635d18e754da303557b656c63ce8e7eb8e77;hpb=5d59cb9859e004df5cde5d83aa7230e621a28b95 diff --git a/lib/Object/Remote/Role/Connector.pm b/lib/Object/Remote/Role/Connector.pm index 83bfcea..d5d46d7 100644 --- a/lib/Object/Remote/Role/Connector.pm +++ b/lib/Object/Remote/Role/Connector.pm @@ -7,6 +7,8 @@ use Moo::Role; requires '_open2_for'; +#TODO return to 10 seconds after debugging +#has timeout => (is => 'ro', default => sub { { after => 10 } }); has timeout => (is => 'ro', default => sub { { after => 10 } }); sub connect { @@ -50,11 +52,10 @@ sub connect { Dlog_trace { "Connection timeout timer has fired for child pid '$child_pid'; is_ready: $_" } $f->is_ready; unless($f->is_ready) { log_warn { "Connection with child pid '$child_pid' has timed out" }; - $f->fail("Connection timed out") unless $f->is_ready; + $f->fail("Connection timed out") unless $f->is_ready; } - #TODO hrm was this supposed to be conditional on the is_ready ? - #a connection is only good for timeout seconds? undef($channel); + } ); log_trace { "connection for child pid '$child_pid' has been initialized" };