From 28788cb9ae3fb39965886dbee36eec9266b1d904 Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 17 Jan 2003 16:18:09 +0000 Subject: [PATCH] fix problem with things banging out and leaving stuff in the input queue --- perl/DXChannel.pm | 1 + perl/cluster.pl | 7 +++++++ 2 files changed, 8 insertions(+) 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; -- 2.43.0