Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 45b3dbce623807bb1818aab9245b8a82dae81dec
Ticket: 3056775fffffffffffffffffffffffffffffffff
Socket -server stops accepting connections under load
User & Date: twylite on 2010-09-23 14:47:04
Changes

  1. icomment:
    Index: tclWinSock.c
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/win/tclWinSock.c,v
    retrieving revision 1.73
    diff -u -r1.73 tclWinSock.c
    --- tclWinSock.c30 Aug 2010 09:19:37 -00001.73
    +++ tclWinSock.c23 Sep 2010 07:36:16 -0000
    @@ -1479,12 +1479,19 @@
          * count must be kept. Decrement the count, and reset the readyEvent bit
          * if the count is no longer > 0.
          */
    +     
    +    /*
    +    * All access to sockets in socketList has to be protected by the lock.  
    +    * Fix for SF Tcl Bug #xxxxxx
    +   */   
    +  WaitForSingleObject(tsdPtr->socketListLock, INFINITE);
     
         infoPtr->acceptEventCount--;
     
         if (infoPtr->acceptEventCount <= 0) {
     infoPtr->readyEvents &= ~(FD_ACCEPT);
         }
    +  SetEvent(tsdPtr->socketListLock);
     
         /*
          * Win-NT has a misfeature that sockets are inherited in child processes
    
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"