From 456f45f30186393a1235ec9290f93a0bf4020bb0 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 16 Feb 2021 14:36:06 +0100 Subject: [PATCH] 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. --- src/server_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server_state.c b/src/server_state.c index e3d285477..302ffb34d 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 */