From: minima Date: Thu, 29 Mar 2001 22:51:11 +0000 (+0000) Subject: a few disconnect ehancements X-Git-Tag: R_1_47~78 X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=33f5a4eea5d24c44885ec0d2b937b0c6b40a331d;p=spider.git a few disconnect ehancements --- 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; } }