X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fdisconnect.pl;fp=cmd%2Fdisconnect.pl;h=9207d73b930c5833725821538524e1ac51c242c2;hb=0a35942621158fae0bca29f3c70c63a97fc4e691;hp=195cdf8c2ae043b9efdf7cb9391a8dc634d5b113;hpb=978b4aae3495fde48c04fec2c88d68464293494a;p=spider.git diff --git a/cmd/disconnect.pl b/cmd/disconnect.pl index 195cdf8c..9207d73b 100644 --- a/cmd/disconnect.pl +++ b/cmd/disconnect.pl @@ -23,12 +23,8 @@ foreach $call (@calls) { } $dxchan->disconnect; push @out, $self->msg('disc2', $call); - } elsif (my $out = grep {$_->{call} eq $call} @main::outstanding_connects) { - unless ($^O =~ /^MS/i) { - kill 'TERM', $out->{pid}; - } - @main::outstanding_connects = grep {$_->{call} ne $call} @main::outstanding_connects; - push @out, $self->msg('disc2', $call); + } elsif (my $conn = Msg->call($call)) { + $conn->disconnect; } else { push @out, $self->msg('e10', $call); }