X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote%2FNode.pm;h=a790ba8d2543af7f0f67e623f1e061224e16dc33;hb=a27266b77a5c66f0c059c865193f64871d0dd90c;hp=93ca2321565aec5ca4b4d16b89b536b660c997f9;hpb=f129bfaf05b1ae0e2e2992cad47a70482dec9885;p=scpubgit%2FObject-Remote.git 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" };