[MEDIUM] now upon startup, haproxy will warn about missing timeouts.
Too many problem reports were caused by missing timeouts. While there has never been any default value since version 1.0, having no timeout is abnormal in networked environments, and will lead to various problems such as CLOSE_WAIT sockets accumulating and nasty things like this. For this reason, it's better to annoy the users until they fix their configs than letting them run buggy configurations.
This commit is contained in:
parent
791d66d363
commit
2738a14941
@ -1873,6 +1873,15 @@ int readcfgfile(char *file)
|
||||
}
|
||||
}
|
||||
|
||||
if ((curproxy->mode == PR_MODE_TCP || curproxy->mode == PR_MODE_HTTP) &&
|
||||
(!curproxy->clitimeout || !curproxy->contimeout || !curproxy->srvtimeout)) {
|
||||
Warning("parsing %s : missing timeouts for listener '%s'.\n"
|
||||
" | While not properly invalid, you will certainly encounter various problems\n"
|
||||
" | with such a configuration. To fix this, please ensure that all following\n"
|
||||
" | values are set to a non-zero value: clitimeout, contimeout, srvtimeout.\n",
|
||||
file, curproxy->id);
|
||||
}
|
||||
|
||||
/* first, we will invert the servers list order */
|
||||
newsrv = NULL;
|
||||
while (curproxy->srv) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user