]> dxcluster.org Git - spider.git/commitdiff
extend coverage of disconnected flag
authorDirk Koopman <djk@tobit.co.uk>
Thu, 10 Aug 2017 09:52:18 +0000 (10:52 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 10 Aug 2017 09:52:18 +0000 (10:52 +0100)
perl/Msg.pm

index ba0e6b8eadf520d92f78ecde2219ae49bc903a1d..bad84a2c4f2277d7b117999f5fbe7e55e6aa9a16 100644 (file)
@@ -278,6 +278,9 @@ sub _send_stuff
        my $conn = shift;
        my $rq = $conn->{outqueue};
     my $sock = $conn->{sock};
+       return unless defined $sock;
+       return if $conn->{disconnecting};
+       
        while (@$rq) {
                my $data = shift @$rq;
                my $lth = length $data;
@@ -377,6 +380,7 @@ sub _rcv {                     # Complement to _send
        my $msg = shift;
     my $sock = $conn->{sock};
     return unless defined($sock);
+       return if $conn->{disconnecting};
 
        $total_in += length $msg;