From bfb3961b8ac7b159ef8155361003bfdd9d26dfad Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 15 Jan 2007 14:43:49 +0000 Subject: [PATCH] try to gather more info on disappearing nodes --- perl/DXProt.pm | 10 +++++++++- perl/Route/Node.pm | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) 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 -- 2.43.0