From b79ff1d9fe1db3a812a276d025b4e3309326a08b Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Fri, 17 Feb 2017 15:36:02 +0000 Subject: [PATCH] Merge r1774541 from trunk: event: close a race condition where we might re-enable listeners while they are already or about to be closed. Submitted by: ylavic Reviewed by: ylavic, jim, wrowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1783413 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 6 ------ server/mpm/event/event.c | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/STATUS b/STATUS index 68a23f2280..573179c8f7 100644 --- a/STATUS +++ b/STATUS @@ -145,12 +145,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) event: close a race condition where we might re-enable listeners while they - are already or about to be closed. - trunk patch: http://svn.apache.org/r1774541 - 2.4.x patch: trunk works - +1: ylavic, jim, wrowe - *) mod_proxy_fcgi: Return HTTP 504 rather than 503 in case of proxy timeout. trunk patch: http://svn.apache.org/r1775858 2.4 patch: trunk works (modulo CHANGES) diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 2c55c5bbf2..0ae597ebfe 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -433,6 +433,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), " -- 2.49.0