From: Christopher Faulet Date: Tue, 16 Feb 2021 13:36:06 +0000 (+0100) Subject: MINOR: server-state: Don't load server-state file for serverless proxies X-Git-Tag: v2.4-dev10~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=456f45f30186393a1235ec9290f93a0bf4020bb0;p=thirdparty%2Fhaproxy.git MINOR: server-state: Don't load server-state file for serverless proxies Just a minor improvement. Proxies with no server are now ignored early. It may happens for listeners for instance. --- diff --git a/src/server_state.c b/src/server_state.c index e3d2854771..302ffb34dd 100644 --- a/src/server_state.c +++ b/src/server_state.c @@ -816,7 +816,7 @@ void apply_server_state(void) struct eb_root local_state_tree = EB_ROOT_UNIQUE; /* servers are only in backends */ - if (!(curproxy->cap & PR_CAP_BE)) + if (!(curproxy->cap & PR_CAP_BE) || !curproxy->srv) continue; /* next proxy */ /* No server-state file for this proxy */