l->analysers |= curpeers->peers_fe->fe_req_ana;
l->default_target = curpeers->peers_fe->default_target;
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
- global.maxsock += l->maxconn;
+ global.maxsock++; /* for the listening socket */
bind_line = 1;
if (cfg_peers->local) {
l->analysers |= curpeers->peers_fe->fe_req_ana;
l->default_target = curpeers->peers_fe->default_target;
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
- global.maxsock += l->maxconn;
+ global.maxsock++; /* for the listening socket */
} /* neither "peer" nor "peers" */
else if (!strcmp(args[0], "disabled")) { /* disables this peers section */
curpeers->state = PR_STSTOPPED;
l->default_target = global.stats_fe->default_target;
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
l->nice = -64; /* we want to boost priority for local stats */
- global.maxsock += l->maxconn;
+ global.maxsock++; /* for the listening socket */
}
}
else if (!strcmp(args[1], "timeout")) {
/* don't make the peers subject to global limits and don't close it in the master */
l->options |= (LI_O_UNLIMITED|LI_O_MWORKER); /* we are keeping this FD in the master */
l->nice = -64; /* we want to boost priority for local stats */
- global.maxsock += l->maxconn;
+ global.maxsock++; /* for the listening socket */
}
+ global.maxsock += mworker_proxy->maxconn;
return 0;
/* it's a sockpair but we don't want to keep the fd in the master */
l->options &= ~LI_O_INHERITED;
l->nice = -64; /* we want to boost priority for local stats */
- global.maxsock += l->maxconn;
+ global.maxsock++; /* for the listening socket */
}
return 0;