From: minima Date: Tue, 10 Apr 2001 10:38:13 +0000 (+0000) Subject: fix pc39 properly on shutdown? X-Git-Tag: R_1_47~35 X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=df3ec97bdbac858d3ba8cc1d78e8bd0bb4f6ea84;p=spider.git fix pc39 properly on shutdown? --- diff --git a/cmd/shutdown.pl b/cmd/shutdown.pl index 4ee21eba..1a5a5663 100644 --- a/cmd/shutdown.pl +++ b/cmd/shutdown.pl @@ -8,12 +8,10 @@ my $call = $self->call; my $ref; return (1, $self->msg('e5')) unless $self->priv >= 5; foreach $ref (DXChannel::get_all()) { - $ref->send_now("D", DXProt::pc39($main::mycall, "Shutdown by $call")) if $ref->is_node && $ref != $DXProt::me; - $ref->send_now("D", $self->msg('shutting')) if $ref->is_user; + $ref->send($self->msg('shutting')) if $ref->is_user; } # give some time for the buffers to empty and then shutdown (see cluster.pl) -$main::decease = 250; - +$main::decease = 25; return (1); diff --git a/perl/cluster.pl b/perl/cluster.pl index 20e80ddb..5c53e113 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -217,28 +217,21 @@ sub cease dbg('local', "Local::finish error $@") if $@; # disconnect nodes - foreach $dxchan (DXChannel->get_all()) { - next unless $dxchan->is_node; - $dxchan->disconnect unless $dxchan == $DXProt::me; + foreach $dxchan (DXChannel->get_all_nodes) { + $dxchan->disconnect(2) unless $dxchan == $DXProt::me; } - Msg->event_loop(1, 0.05); - Msg->event_loop(1, 0.05); + Msg->event_loop(100, 0.01); # disconnect users - foreach $dxchan (DXChannel->get_all()) { - next if $dxchan->is_node; - $dxchan->disconnect(2) unless $dxchan == $DXProt::me; + foreach $dxchan (DXChannel->get_all_users) { + $dxchan->disconnect; } # disconnect AGW AGWMsg::finish(); - - Msg->event_loop(1, 0.05); - Msg->event_loop(1, 0.05); - Msg->event_loop(1, 0.05); - Msg->event_loop(1, 0.05); - Msg->event_loop(1, 0.05); - Msg->event_loop(1, 0.05); + + # end everything else + Msg->event_loop(100, 0.01); DXUser::finish(); DXDupe::finish();