Changeset 454

Show
Ignore:
Timestamp:
07/20/07 12:42:06 (1 year ago)
Author:
blackhedd
Message:

relaxed an assert that may be causing crashes under heavy loads.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • version_0/ext/ed.cpp

    r433 r454  
    176176        bConnectPending (false), 
    177177        bReadAttemptedAfterClose (false), 
     178        bWriteAttemptedAfterClose (false), 
    178179        OutboundDataSize (0), 
    179180        #ifdef WITH_SSL 
     
    538539         * have used up its available output buffers between the select call 
    539540         * and when we get here. So this condition is not an error. 
     541         * 
     542         * 20Jul07, added the same kind of protection against an invalid socket 
     543         * that is at the top of ::Read. Not entirely how this could happen in  
     544         * real life (connection-reset from the remote peer, perhaps?), but I'm 
     545         * doing it to address some reports of crashing under heavy loads. 
    540546         */ 
    541547 
    542548        int sd = GetSocket(); 
    543         assert (sd != INVALID_SOCKET); 
     549        //assert (sd != INVALID_SOCKET); 
     550        if (sd == INVALID_SOCKET) { 
     551                assert (!bWriteAttemptedAfterClose); 
     552                bWriteAttemptedAfterClose = true; 
     553                return; 
     554        } 
    544555 
    545556        LastIo = gCurrentLoopTime; 
  • version_0/ext/ed.h

    r433 r454  
    168168                bool bConnectPending; 
    169169                bool bReadAttemptedAfterClose; 
     170                bool bWriteAttemptedAfterClose; 
    170171 
    171172                deque<OutboundPage> OutboundPages;