X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=fb1b4b95b85e1b28ae0b2e40ae27164f42070699;hb=502f900651a46b96008028945616a3b610d6cc7a;hp=74353d5b0ba8cf8de770070e1229ad609345af7a;hpb=1f3035508fe4dacf899742db444ade501091e7de;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 74353d5b..fb1b4b95 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -878,11 +878,9 @@ sub finish { my $self = shift; my $call = $self->call; - my $nopc39 = shift; + my $conn = shift; my $ref = DXCluster->get_exact($call); - $self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op"))) unless $nopc39; - # unbusy and stop and outgoing mail my $mref = DXMsg::get_busy($call); $mref->stop_msg($call) if $mref; @@ -1351,5 +1349,17 @@ sub addrcmd route(undef, $to, pc34($main::mycall, $to, $cmd)); } } + +sub disconnect +{ + my $self = shift; + my $nopc39 = shift; + + if ($self->{conn} && !$nopc39) { + $self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op"))); + } + + $self->SUPER::disconnect; +} 1; __END__