use Filter;
use Local;
use DXDb;
+use Data::Dumper;
+
use Fcntl ':flock';
use Carp qw(cluck);
@inqueue = (); # the main input queue, an array of hashes
$systime = 0; # the time now (in seconds)
-$version = "1.34"; # the version no of the software
+$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
# create the channel
$dxchan = DXCommandmode->new($call, $conn, $user) if ($user->sort eq 'U');
$dxchan = DXProt->new($call, $conn, $user) if ($user->sort eq 'A');
+ $dxchan = BBS->new($call, $conn, $user) if ($user->sort eq 'B');
die "Invalid sort of user on $call = $sort" if !$dxchan;
}
};
dbg('local', "Local::finish error $@") if $@;
- # close all databases
- DXDb::closeall;
-
# disconnect users
foreach $dxchan (DXChannel->get_all()) {
next if $dxchan->is_ak1a;
Msg->event_loop(1, 0.05);
Msg->event_loop(1, 0.05);
DXUser::finish();
+
+ # close all databases
+ DXDb::closeall;
+
dbg('chan', "DXSpider version $version ended");
Log('cluster', "DXSpider V$version stopped");
dbgclose();
{
$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