]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: spoe: Don't stop disabled proxies
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 May 2023 07:08:28 +0000 (09:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 May 2023 07:22:46 +0000 (09:22 +0200)
SPOE register a signal handler to be able to stop SPOE applets ASAP during
soft-stop. Disabled proxies must be ignored at this staged because they are
not fully configured.

For now, it is useless but this change is mandatory to fix a bug.

src/flt_spoe.c

index 6ab1cfb3ebbbac1fee2a1348b5e7faf293b7d46c..301d950bdac170fbb9d8595d3c8d9b818ee34db0 100644 (file)
@@ -2987,6 +2987,14 @@ spoe_sig_stop(struct sig_handler *sh)
        while (p) {
                struct flt_conf *fconf;
 
+               /* SPOE filter are not initialized for disabled proxoes. Move to
+                * the next one
+                */
+               if (p->flags & PR_FL_DISABLED) {
+                       p = p->next;
+                       continue;
+               }
+
                list_for_each_entry(fconf, &p->filter_configs, list) {
                        struct spoe_config *conf;
                        struct spoe_agent  *agent;