$noports = 0;
$lastytime = $lasthtime = time;
$ypolltime = 10 unless defined $ypolltime;
-$hpolltime = 120 unless defined $hpolltime;
+$hpolltime = 300 unless defined $hpolltime;
%circuit = ();
sub init
_sendf('m') if $monitor;
}
+my $finishing = 0;
+
sub finish
{
+ return if $finishing;
if ($sock) {
+ $finishing = 1;
dbg('err', "AGW ending...");
for (values %circuit) {
$_->disconnect;