]> granicus.if.org Git - apache/commitdiff
event: close a race condition where we might re-enable listeners while they
authorYann Ylavic <ylavic@apache.org>
Thu, 15 Dec 2016 23:55:12 +0000 (23:55 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 15 Dec 2016 23:55:12 +0000 (23:55 +0000)
are already or about to be closed.

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

server/mpm/event/event.c

index 11bb876a52b8366a872fda2825a471f6dcd7cff4..b6884059017f235a2e107783f12a5734c5bfb9d7 100644 (file)
@@ -490,6 +490,9 @@ static void disable_listensocks(int process_slot)
 static void enable_listensocks(int process_slot)
 {
     int i;
+    if (listener_may_exit) {
+        return;
+    }
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00457)
                  "Accepting new connections again: "
                  "%u active conns (%u lingering/%u clogged/%u suspended), "