1. I believe I have fixed all the login/logout 'broken pipe' errors
[spider.git] / perl / DXProt.pm
index 74353d5b0ba8cf8de770070e1229ad609345af7a..fb1b4b95b85e1b28ae0b2e40ae27164f42070699 100644 (file)
@@ -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__