From: minima Date: Fri, 17 Jan 2003 16:18:09 +0000 (+0000) Subject: fix problem with things banging out and leaving stuff in the input queue X-Git-Tag: PRE-1-52~90 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=28788cb9ae3fb39965886dbee36eec9266b1d904;p=spider.git fix problem with things banging out and leaving stuff in the input queue --- diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 9ef0cec2..3b3ac62f 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -426,6 +426,7 @@ sub disconnect my $self = shift; my $user = $self->{user}; + main::clean_inqueue($self); # clear out any remaining incoming frames $user->close() if defined $user; $self->{conn}->disconnect; $self->del(); diff --git a/perl/cluster.pl b/perl/cluster.pl index 655a986b..58742e19 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -240,6 +240,13 @@ sub rec } } +# remove any outstanding entries on the inqueue after a disconnection (usually) +sub clean_inqueue +{ + my $dxchan = shift; + @inqueue = grep {$_ != $dxchan} @inqueue; +} + sub login { return \&new_channel;