mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
MINOR: mworker/cli: create MASTER proxy before mcli listeners
For the master process we always need to create a MASTER proxy, even if master cli settings were not provided via command line, because now we bind a listener in the master process context at ipc_fd[0]. So, MASTER proxy should be already allocated at this moment.
This commit is contained in:
parent
6ec38c9a74
commit
26ad5465cc
@ -2217,7 +2217,14 @@ static void init(int argc, char **argv)
|
||||
*/
|
||||
global.nbtgroups = 1;
|
||||
global.nbthread = 1;
|
||||
/* master CLI */
|
||||
|
||||
/* creates MASTER proxy and attaches server to child->ipc_fd[0] */
|
||||
if (mworker_cli_proxy_create() < 0) {
|
||||
ha_alert("Can't create the master's CLI.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* creates reload sockpair and listeners for master CLI (-S) */
|
||||
mworker_create_master_cli();
|
||||
}
|
||||
}
|
||||
|
@ -803,11 +803,6 @@ void mworker_create_master_cli(void)
|
||||
if (!LIST_ISEMPTY(&mworker_cli_conf)) {
|
||||
char *path = NULL;
|
||||
|
||||
if (mworker_cli_proxy_create() < 0) {
|
||||
ha_alert("Can't create the master's CLI.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(c, it, &mworker_cli_conf, list) {
|
||||
if (mworker_cli_master_proxy_new_listener(c->s) == NULL) {
|
||||
ha_alert("Can't create the master's CLI.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user