]> dxcluster.net Git - spider.git/commitdiff
fix problem with things banging out and leaving stuff in the input queue
authorminima <minima>
Fri, 17 Jan 2003 16:18:09 +0000 (16:18 +0000)
committerminima <minima>
Fri, 17 Jan 2003 16:18:09 +0000 (16:18 +0000)
perl/DXChannel.pm
perl/cluster.pl

index 9ef0cec243671b78dafffd5ab306cb7c33cc3d4c..3b3ac62f13b84e193c0ff661981d3ba3a7981616 100644 (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();
index 655a986b1af35dfd881795a3a3ffb320a867dc82..58742e1952bd78b3e8618c8d51451c8c083a7f3f 100755 (executable)
@@ -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;