From: minima Date: Mon, 15 Jan 2007 14:43:49 +0000 (+0000) Subject: try to gather more info on disappearing nodes X-Git-Tag: 1.54~44 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bfb3961b8ac7b159ef8155361003bfdd9d26dfad;p=spider.git try to gather more info on disappearing nodes --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index c00219ec..f4e4e0d5 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -843,9 +843,17 @@ sub time_out_pc92_routes my @rdel; foreach my $n (@nodes) { if ($n->dec_obs <= 0) { + if (my $dxchan = DXChannel::get($n->call)) { + dbg("ROUTE: disconnecting local pc92 $_->{call} on obscount") if isdbg('route'); + $dxchan->disconnect; + next; + } my @parents = map {Route::Node::get($_)} $n->parents; for (@parents) { - push @rdel, $n->del($_) if $_; + if ($_) { + dbg("ROUTE: deleting pc92 $_->{call} from $n->{call} on obscount") if isdbg('route'); + push @rdel, $n->del($_); + } } } } diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index 514f0c0e..ee1c9140 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -309,6 +309,7 @@ sub dec_obs { my $self = shift; $self->{obscount}--; + return $self->{obscount}; } sub reset_obs