MINOR: proxy: do not change the listeners' maxconn when updating the frontend's

It is possible to update a frontend's maxconn from the CLI. Unfortunately
when doing this it scratches all listeners' maxconn values and sets them
all to the new frontend's value. This can be problematic when mixing
different traffic classes (bind to interface or private networks, etc).

Now that the listener's maxconn is allowed to remain unset, let's not
change these values when setting the frontend's maxconn. This way the
overall frontend's limit can be raised but if certain specific listeners
had their own value forced in the config, they will be preserved. This
makes more sense and is more in line with the principle of defaults
propagation.
This commit is contained in:
Willy Tarreau 2019-02-27 16:53:33 +01:00
parent a8cf66bcab
commit d89cc8bfc0

View File

@ -1884,8 +1884,6 @@ static int cli_parse_set_maxconn_frontend(char **args, char *payload, struct app
px->maxconn = v;
list_for_each_entry(l, &px->conf.listeners, by_fe) {
if (l->maxconn)
l->maxconn = v;
if (l->state == LI_FULL)
resume_listener(l);
}