From: William A. Rowe Jr Date: Sun, 4 Aug 2002 18:25:47 +0000 (+0000) Subject: Outch! Always check completion against actual socket/pipe/file handles, X-Git-Tag: 2.0.40~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f364721b24b25d0014b437d3aaeaab6b5d6cb5d;p=apache 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 --- 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,