]> granicus.if.org Git - apache/commitdiff
Grab the context lock when draining the qhead
authorBill Stoddard <stoddard@apache.org>
Tue, 3 Apr 2001 00:40:56 +0000 (00:40 +0000)
committerBill Stoddard <stoddard@apache.org>
Tue, 3 Apr 2001 00:40:56 +0000 (00:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88671 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/mpm_winnt.c

index 82cfbee80225d88590b95fea50f54fd60bb08f9d..b3d72d25baf6ca4b3f51a7b5d7d31518689e49a3 100644 (file)
@@ -1079,7 +1079,7 @@ static void child_main()
     }
 
     /* Setting is_graceful will cause keep-alive connections to be closed
-     * rather then block on the next network read.
+     * rather than block on the next network read.
      */
     is_graceful = 1;
 
@@ -1129,11 +1129,13 @@ static void child_main()
             Sleep(1000);
         }
         /* Empty the accept queue of completion contexts */
+        apr_lock_acquire(qlock);
         while (qhead) {
             CloseHandle(qhead->Overlapped.hEvent);
             closesocket(qhead->accept_socket);
             qhead = qhead->next;
         }
+        apr_lock_release(qlock);
     }
 
     /* Give busy worker threads a chance to service their connections */