fix problem with things banging out and leaving stuff in the input queue
[spider.git] / perl / cluster.pl
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;