]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxies: Initialize the per-thread structure earlier.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 17 Apr 2025 15:05:07 +0000 (17:05 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 17 Apr 2025 15:38:23 +0000 (17:38 +0200)
Move the call to initialize the proxy's per-thread structure earlier
than currently done, so that they are usable when we're initializing the
load balancers.

src/cfgparse.c

index d1c850cdc1554e676cf969d221cd03854af203f1..9c567d936fb0365d3f5446d7b7a34787554a63c7 100644 (file)
@@ -2826,6 +2826,7 @@ init_proxies_list_stage1:
                struct logger *tmplogger;
                unsigned int next_id;
 
+               proxy_init_per_thr(curproxy);
                if (!(curproxy->cap & PR_CAP_INT) && curproxy->uuid < 0) {
                        /* proxy ID not set, use automatic numbering with first
                         * spare entry starting with next_pxid. We don't assign
@@ -4202,7 +4203,6 @@ init_proxies_list_stage2:
                struct listener *listener;
                unsigned int next_id;
 
-               proxy_init_per_thr(curproxy);
                /* Configure SSL for each bind line.
                 * Note: if configuration fails at some point, the ->ctx member
                 * remains NULL so that listeners can later detach.