From 9f364721b24b25d0014b437d3aaeaab6b5d6cb5d Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sun, 4 Aug 2002 18:25:47 +0000 Subject: [PATCH] Outch! Always check completion against actual socket/pipe/file handles, never look at the completion event itself. Could be part of the zone alarm mischief. Note also that waiting on two events is better than waking every few minutes. Factoring out max_requests_per_child_hit or whatever that event name is will help here. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96305 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/winnt/child.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 45dff5dfa7..773d7b49d1 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -536,11 +536,14 @@ static void winnt_accept(void *lr_) continue; } - /* Wait for pending i/o. Wake up once per second to check for shutdown */ + /* Wait for pending i/o. + * Wake up once per second to check for shutdown . + * XXX: We should be waiting on exit_event instead of polling + */ while (1) { rv = WaitForSingleObject(context->Overlapped.hEvent, 1000); if (rv == WAIT_OBJECT_0) { - if (!GetOverlappedResult(context->Overlapped.hEvent, + if (!GetOverlappedResult(context->accept_socket, &context->Overlapped, &BytesRead, FALSE)) { ap_log_error(APLOG_MARK,APLOG_WARNING, GetLastError(), ap_server_conf, -- 2.50.1