]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: startup: move comment about nbthread where it's more appropriate
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Thu, 26 Jun 2025 14:50:19 +0000 (16:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jun 2025 16:02:16 +0000 (18:02 +0200)
Move the comment about non_global_section_parsed just above the line, where
we reset it.

src/haproxy.c

index 731442eb6a97246968c8a7a2fd28df655f61f791..6e1d24f00f28381943635c87ebe289e439f38ecc 100644 (file)
@@ -3251,13 +3251,6 @@ int main(int argc, char **argv)
        /* Worker, daemon, foreground modes read the rest of the config */
        if (!master) {
                usermsgs_clr("config");
-
-               /* nbthread and *thread keywords parsers are sensible to global
-                * section position, it should be placed as the first in
-                * the configuration, if these keywords are inside. So, let's
-                * reset non_global_section_parsed counter for the second
-                * configuration reading
-                */
                if (global.mode & MODE_MWORKER) {
                        if (clean_env() != 0) {
                                ha_alert("Worker failed to clean its env, exiting.\n");
@@ -3278,6 +3271,12 @@ int main(int argc, char **argv)
                 */
                setenv("HAPROXY_LOCALPEER", localpeer, 1);
 
+               /* nbthread and *thread keywords parsers are sensible to global
+                * section position, it should be placed as the first in
+                * the configuration, if these keywords are inside. So, let's
+                * reset non_global_section_parsed counter for the second
+                * configuration reading
+                */
                non_global_section_parsed = 0;
                if (read_cfg() < 0) {
                        list_for_each_entry_safe(cfg, cfg_tmp, &cfg_cfgfiles, list) {