diff options
author | Willy Tarreau <w@1wt.eu> | 2020-09-24 08:15:48 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2020-10-07 18:44:08 +0200 |
commit | 5ec52697cc93b1d04be4146df3808d6b7323dba8 (patch) | |
tree | a99c0018cb0f6f67fc4015eff1d2f685b8f71d78 | |
parent | de9dd7947334fe325936e76b7a21abcdd641b7b3 (diff) | |
download | haproxy-5ec52697cc93b1d04be4146df3808d6b7323dba8.tar.gz |
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.
-rw-r--r-- | src/haproxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/haproxy.c b/src/haproxy.c index 69f4f20b4..aa865f0f8 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) { |