fix problem with things banging out and leaving stuff in the input queue

This commit is contained in:
minima 2003-01-17 16:18:09 +00:00
parent 7b616aeabc
commit 28788cb9ae
2 changed files with 8 additions and 0 deletions

View File

@ -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();

View File

@ -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;