fix pc39 properly on shutdown?
authorminima <minima>
Tue, 10 Apr 2001 10:38:13 +0000 (10:38 +0000)
committerminima <minima>
Tue, 10 Apr 2001 10:38:13 +0000 (10:38 +0000)
cmd/shutdown.pl
perl/cluster.pl

index 4ee21ebade351aae062ff0b6029a6727d1f2a589..1a5a5663ec2d426773ce47ed713e060a687056d9 100644 (file)
@@ -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);
index 20e80ddbfe16f61978b8f5731431a94c2e19375f..5c53e113d0e8dbc02907e6e055f334d6df03bc4b 100755 (executable)
@@ -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();