mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-20 20:57:00 +00:00
MINOR: server: make sure pool-max-conn is >= -1
The keyword parser doesn't check the value range, but supported values are -1 and positive values, thus we should check it. This can be backported to 1.9.
This commit is contained in:
parent
1e7d444eec
commit
cb923d5001
@ -389,7 +389,12 @@ static int srv_parse_pool_max_conn(char **args, int *cur_arg, struct proxy *curp
|
||||
memprintf(err, "'%s' expects <value> as argument.\n", args[*cur_arg]);
|
||||
return ERR_ALERT | ERR_FATAL;
|
||||
}
|
||||
|
||||
newsrv->max_idle_conns = atoi(arg);
|
||||
if ((int)newsrv->max_idle_conns < -1) {
|
||||
memprintf(err, "'%s' must be >= -1", args[*cur_arg]);
|
||||
return ERR_ALERT | ERR_FATAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user