X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fdisconnect.pl;h=195cdf8c2ae043b9efdf7cb9391a8dc634d5b113;hb=6616898c4373267522bcacca20e58157bd5a538b;hp=6c038386747ac6c619ab2a45295df3fcbf81ffcd;hpb=465426f9282b990ec3462c63e5ca7613f92fb290;p=spider.git diff --git a/cmd/disconnect.pl b/cmd/disconnect.pl index 6c038386..195cdf8c 100644 --- a/cmd/disconnect.pl +++ b/cmd/disconnect.pl @@ -15,7 +15,7 @@ foreach $call (@calls) { next if $call eq $main::mycall; my $dxchan = DXChannel->get($call); if ($dxchan) { - if ($dxchan->is_ak1a) { + if ($dxchan->is_node) { # $dxchan->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', $self->call))); } else { return (1, $self->msg('e5')) if $self->priv < 8; @@ -23,6 +23,12 @@ 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); } else { push @out, $self->msg('e10', $call); }