]> granicus.if.org Git - apache/commitdiff
only need one main listener loop.
authorGreg Ames <gregames@apache.org>
Sat, 27 Nov 2004 19:29:26 +0000 (19:29 +0000)
committerGreg Ames <gregames@apache.org>
Sat, 27 Nov 2004 19:29:26 +0000 (19:29 +0000)
logic changes only to minimize diff.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106743 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/experimental/event/event.c

index 614469a5cff71dee1a434afc5ae6b092347c0bcd..3e4af4f4703ef5b3a6400925e2ca8908cc9dcf5d 100644 (file)
@@ -839,19 +839,12 @@ static void *listener_thread(apr_thread_t * thd, void *dummy)
     unblock_signal(LISTENER_SIGNAL);
     apr_signal(LISTENER_SIGNAL, dummy_signal_handler);
 
-    while (1) {
-        /* TODO: requests_this_child should be synchronized - aaron */
-        if (requests_this_child <= 0) {
-            check_infinite_requests();
-        }
-
-        if (listener_may_exit)
-            break;
-
-        /* We've already decremented the idle worker count inside
-         * ap_queue_info_wait_for_idler. */
         while (!listener_may_exit) {
 
+            if (requests_this_child <= 0) {
+                check_infinite_requests();
+            }
+
             rc = apr_pollset_poll(event_pollset, timeout_interval, &num,
                                   &out_pfd);
 
@@ -992,8 +985,7 @@ static void *listener_thread(apr_thread_t * thd, void *dummy)
             }
             apr_thread_mutex_unlock(timeout_mutex);
 
-        }                       /* while we are to keep listening */
-    }                           /* while 1 - main loop */
+        }     /* listener main loop */
 
     ap_queue_term(worker_queue);
     dying = 1;