From 1229555fd747b38544ac355dbb87e0addf594faf Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Tue, 3 Apr 2001 00:40:56 +0000 Subject: [PATCH] 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 --- server/mpm/winnt/mpm_winnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- 2.40.0