From: Bill Stoddard Date: Tue, 3 Apr 2001 00:40:56 +0000 (+0000) Subject: Grab the context lock when draining the qhead X-Git-Tag: 2.0.16~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1229555fd747b38544ac355dbb87e0addf594faf;p=apache Grab the context lock when draining the qhead git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88671 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 82cfbee802..b3d72d25ba 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -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 */