]> granicus.if.org Git - apache/commitdiff
event: have_idle_worker must not be cleared in every listener_thread iteration.
authorJan Kaluža <jkaluza@apache.org>
Mon, 6 Oct 2014 05:57:02 +0000 (05:57 +0000)
committerJan Kaluža <jkaluza@apache.org>
Mon, 6 Oct 2014 05:57:02 +0000 (05:57 +0000)
Fixes bug when workers were not stopped after graceful restart (introduced in
r1605328).

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

server/mpm/event/event.c

index e278cd14852451b735b183715514301203b9c027..115be59b4780fcbe55a8d814b7f4012fbc82d4e4 100644 (file)
@@ -1655,6 +1655,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
     apr_pool_t *tpool = apr_thread_pool_get(thd);
     apr_time_t timeout_time = 0, last_log;
     int closed = 0, listeners_disabled = 0;
+    int have_idle_worker = 0;
 
     last_log = apr_time_now();
     free(ti);
@@ -1689,7 +1690,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
         apr_interval_time_t timeout_interval;
         apr_time_t now;
         int workers_were_busy = 0;
-        int have_idle_worker = 0;
         if (listener_may_exit) {
             close_listeners(process_slot, &closed);
             if (terminate_mode == ST_UNGRACEFUL