X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FAGWMsg.pm;h=7582e2c723be8d45e0e3b0f23293e3d6f72174a3;hb=95345d68a5a8ac618021c0786c7234258b903f6e;hp=6afcbcba18416aac52cee63e5d10b605edd4c09b;hpb=3362e8773892a409a7b6193eeaeaa9ed1e186e09;p=spider.git diff --git a/perl/AGWMsg.pm b/perl/AGWMsg.pm index 6afcbcba..7582e2c7 100644 --- a/perl/AGWMsg.pm +++ b/perl/AGWMsg.pm @@ -51,7 +51,7 @@ sub init finish(); dbg('err', "AGW initialising and connecting to $addr/$port ..."); - $sock = IO::Socket::INET->new(PeerAddr => $addr, PeerPort => $port, Proto=>'tcp', Timeout => 30); + $sock = IO::Socket::INET->new(PeerAddr => $addr, PeerPort => $port, Proto=>'tcp', Timeout=>15); unless ($sock) { dbg('err', "Cannot connect to AGW Engine at $addr/$port $!"); return; @@ -206,7 +206,7 @@ sub _error Msg::set_event_handler($sock, read=>undef, write=>undef, error=>undef); $sock = undef; for (%circuit) { - next unless $_->isa('AGWMsg'); + &{$_->{eproc}}() if $_->{eproc}; $_->disconnect; } }