From: Willy Tarreau Date: Thu, 24 Sep 2020 06:15:48 +0000 (+0200) Subject: MINOR: startup: don't rely on PR_STNEW to check for listeners X-Git-Tag: v2.3-dev6~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b50bf046e8340d32a2034affdc515881e0b5caf7;p=thirdparty%2Fhaproxy.git MINOR: startup: don't rely on PR_STNEW to check for listeners Instead of looking at listeners in proxies in PR_STNEW state, we'd rather check for listeners in those not in PR_STSTOPPED as it's only this state which indicates the proxy was disabled. And let's check the listeners count instead of testing the list's head. --- diff --git a/src/haproxy.c b/src/haproxy.c index 69f4f20b4d..aa865f0f84 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2010,7 +2010,7 @@ static void init(int argc, char **argv) break; for (px = proxies_list; px; px = px->next) - if (px->state == PR_STNEW && !LIST_ISEMPTY(&px->conf.listeners)) + if (px->state != PR_STSTOPPED && px->li_all) break; if (pr || px) {