force PC39 on ak1a disconnects
[spider.git] / perl / cluster.pl
index 0ed98e55b39ddd33926ec6dbcd8e3aa670b080f2..b67b9ff88e98b4c150a29d77dd61897ded2d0370 100755 (executable)
@@ -60,6 +60,8 @@ use CmdAlias;
 use Filter;
 use Local;
 use DXDb;
+use Data::Dumper;
+
 use Fcntl ':flock'; 
 
 use Carp qw(cluck);
@@ -71,6 +73,7 @@ $systime = 0;                                 # the time now (in seconds)
 $version = "1.35";                             # the version no of the software
 $starttime = 0;                 # the starting time of the cluster   
 $lockfn = "cluster.lock";       # lock file name
+@outstanding_connects = ();     # list of outstanding connects
       
 # handle disconnections
 sub disconnect
@@ -227,6 +230,7 @@ sub reap
 {
        $SIG{'CHLD'} = \&reap;
        my $cpid = wait;
+       @outstanding_connects = grep {$_->{pid} != $cpid} @outstanding_connects;
 }
 
 # this is where the input queue is dealt with and things are dispatched off to other parts of