mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
MINOR: cfgparse: finish to set up servers outside of the proxy setup loop
Till now servers were only initialized as part of the proxy setup loop, which doesn't cover peers, tcp log, dns, lua etc. Let's move this part out of this loop and instead iterate over all registered servers. This way we're certain to visit them all. The patch looks big but it's just a move of a large block with the corresponding reindent (as can be checked with diff -b). It relies on the two previous ones ("MINOR: server: add a global list of all known servers and" and "CLEANUP: lua: set a dummy file name and line number on the dummy servers").
This commit is contained in:
parent
198e92a8e5
commit
4cdac166e0
@ -3235,9 +3235,16 @@ out_uri_auth_compat:
|
||||
/* update the mux */
|
||||
newsrv->mux_proto = mux_ent;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************/
|
||||
/* At this point, target names have already been resolved. */
|
||||
/***********************************************************/
|
||||
|
||||
/* we must finish to initialize certain things on the servers */
|
||||
|
||||
list_for_each_entry(newsrv, &servers_list, global_list) {
|
||||
/* initialize idle conns lists */
|
||||
for (newsrv = curproxy->srv; newsrv; newsrv = newsrv->next) {
|
||||
int i;
|
||||
|
||||
newsrv->available_conns_tree = calloc(global.nbthread, sizeof(*newsrv->available_conns_tree));
|
||||
@ -3305,11 +3312,7 @@ out_uri_auth_compat:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************/
|
||||
/* At this point, target names have already been resolved. */
|
||||
/***********************************************************/
|
||||
|
||||
/* Check multi-process mode compatibility */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user