]> granicus.if.org Git - apache/commitdiff
Outch! Always check completion against actual socket/pipe/file handles,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 4 Aug 2002 18:25:47 +0000 (18:25 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 4 Aug 2002 18:25:47 +0000 (18:25 +0000)
  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

index 45dff5dfa789dbecb053c83907a860318b71df98..773d7b49d19934b788d2c1dbdbd90b22ace25ead 100644 (file)
@@ -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,