]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: server-state: Don't load server-state file for serverless proxies
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Feb 2021 13:36:06 +0000 (14:36 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Feb 2021 09:02:39 +0000 (10:02 +0100)
Just a minor improvement. Proxies with no server are now ignored early. It
may happens for listeners for instance.

src/server_state.c

index e3d2854771b0af8b5a7e33619a7f080cd92b7f75..302ffb34dd94a7d8d7f929f63725ec9e9f55f5e3 100644 (file)
@@ -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 */