]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mworker: don't set the PROC_O_LEAVING flag on master process
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 5 Mar 2026 15:29:37 +0000 (16:29 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 9 Mar 2026 15:51:56 +0000 (16:51 +0100)
The master process in the proc_list mustn't set the PROC_O_LEAVING flag
since the reload doesn't mean the master will leave.

Could be backported as far as 3.1.

src/mworker.c

index 956ffc041df3625d86a3ff7feaab230603b710f2..51dcd531415ac769d139b702333e120ca53c2203 100644 (file)
@@ -232,7 +232,7 @@ int mworker_env_to_proc_list()
        /* set the leaving processes once we know which number of reloads are the current processes */
 
        list_for_each_entry(child, &proc_list, list) {
-               if (child->reloads > 0)
+               if (child->reloads > 0  && !(child->options & PROC_O_TYPE_MASTER))
                        child->options |= PROC_O_LEAVING;
        }