X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FNode.pm;h=a790ba8d2543af7f0f67e623f1e061224e16dc33;hp=93ca2321565aec5ca4b4d16b89b536b660c997f9;hb=8faf2a289aa3409e7cafe2536f943fb43033b086;hpb=9de32e1d7e5f896e00a8d14aeb2103be94b047f2 diff --git a/lib/Object/Remote/Node.pm b/lib/Object/Remote/Node.pm index 93ca232..a790ba8 100644 --- a/lib/Object/Remote/Node.pm +++ b/lib/Object/Remote/Node.pm @@ -10,11 +10,7 @@ use CPS::Future; sub run { my ($class, %args) = @_; log_trace { "run() has been invoked on remote node" }; - - if ($args{watchdog_timeout}) { - Object::Remote::WatchDog->new(timeout => $args{watchdog_timeout}); - } - + my $c = Object::Remote::Connector::STDIO->new->connect; $c->register_class_call_handler; @@ -30,6 +26,12 @@ sub run { print { $c->send_to_fh } "Shere\n"; log_debug { "Node is going to start the run loop" }; + if ($args{watchdog_timeout}) { + Object::Remote::WatchDog->new(timeout => $args{watchdog_timeout}); + } else { + #reset connection watchdog from the fatnode + alarm(0); + } $loop->want_run; $loop->run_while_wanted; log_debug { "Run loop invocation in node has completed" };