mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
[MINOR] always ensure that minconn < maxconn or override it.
This commit is contained in:
parent
d4ba08d7ca
commit
2b598cc00a
@ -9465,8 +9465,11 @@ int readcfgfile(char *file) {
|
|||||||
*/
|
*/
|
||||||
newsrv = curproxy->srv;
|
newsrv = curproxy->srv;
|
||||||
while (newsrv != NULL) {
|
while (newsrv != NULL) {
|
||||||
if (newsrv->minconn && !newsrv->maxconn) {
|
if (newsrv->minconn >= newsrv->maxconn) {
|
||||||
/* only 'minconn' was specified. Let's turn this into maxconn */
|
/* Only 'minconn' was specified, or it was higher than or equal
|
||||||
|
* to 'maxconn'. Let's turn this into maxconn and clean it, as
|
||||||
|
* this will avoid further useless expensive computations.
|
||||||
|
*/
|
||||||
newsrv->maxconn = newsrv->minconn;
|
newsrv->maxconn = newsrv->minconn;
|
||||||
newsrv->minconn = 0;
|
newsrv->minconn = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user