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.
This commit is contained in:
Christopher Faulet 2021-02-16 14:36:06 +01:00
parent 3e3d3be708
commit 456f45f301

View 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 */