disable input when in disconnection.
authorminima <minima>
Fri, 11 Jan 2002 20:44:10 +0000 (20:44 +0000)
committerminima <minima>
Fri, 11 Jan 2002 20:44:10 +0000 (20:44 +0000)
Changes
perl/cluster.pl

diff --git a/Changes b/Changes
index 4e77e66521be6028ed4419f290dec4991fb4d662..c7fdcfceebd997003300520de5f46ad398b5c41e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 11Jan02=======================================================================
 1. Make M$ TCP connx blocking again, sigh...
 2. backed out ALL the M$ speedup and make nicer changes :-(
+3. cope with data coming in during the disconnection process. Don't worry
+Earth people, this will take no longer than 15 of your Earth seconds...
 10Jan02=======================================================================
 1. set SO_LINGER = 0 to try to prevent the system sending data on a closing
 socket. This MAY help some of the hanging problems (but I am now beginning
index 203f6956a1bc8a011dd054b3e21e6d64c8ceacbd..d108a560c3187871f370b6615afad51bab761ce4 100755 (executable)
@@ -293,7 +293,7 @@ sub process_inqueue
        while (@inqueue) {
                my $self = shift @inqueue;
                return if !$self;
-       
+
                my $data = $self->{data};
                my $dxchan = $self->{dxchan};
                my $error;
@@ -302,13 +302,18 @@ sub process_inqueue
        
                # do the really sexy console interface bit! (Who is going to do the TK interface then?)
                dbg("<- $sort $call $line\n") if $sort ne 'D' && isdbg('chan');
-
+               if ($self->{disconnecting}) {
+                       dbg('In disconnection, ignored');
+                       next;
+               }
+               
                # handle A records
                my $user = $dxchan->user;
                if ($sort eq 'A' || $sort eq 'O') {
                        $dxchan->start($line, $sort);  
                } elsif ($sort eq 'I') {
                        die "\$user not defined for $call" if !defined $user;
+
                        # normal input
                        $dxchan->normal($line);
                } elsif ($sort eq 'Z') {