CLEANUP: config: set the maxaccept value for peers listeners earlier

Since we introduced bind_conf in peers, we can set maxaccept in a cleaner
way at the proper time, let's do this to make the code more readable.
This commit is contained in:
Willy Tarreau 2013-01-18 10:51:07 +01:00
parent 67c2abc2f3
commit acf3bf94d0

View File

@ -1757,6 +1757,7 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
}
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
l->maxaccept = 1;
l->maxconn = ((struct proxy *)curpeers->peers_fe)->maxconn;
l->backlog = ((struct proxy *)curpeers->peers_fe)->backlog;
l->timeout = &((struct proxy *)curpeers->peers_fe)->timeout.client;
@ -7076,7 +7077,6 @@ out_uri_auth_compat:
while (*last) {
curpeers = *last;
if (curpeers->peers_fe) {
LIST_NEXT(&curpeers->peers_fe->conf.listeners, struct listener *, by_fe)->maxaccept = 1;
last = &curpeers->next;
continue;
}