mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
fix problem with things banging out and leaving stuff in the input queue
This commit is contained in:
parent
7b616aeabc
commit
28788cb9ae
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user