mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUG/MINOR: backend: properly handle redispatch 0
According to the documentation, "option redispatch 0" is expected to
disable redispatch just like "no option redispatch", but due to the
fact that it keeps PR_O_REDISP set, it doesn't actually work. Let's
make sure value 0 is properly handled and drops PR_O_REDISP. This can
be backported to all versions since it seems it has been broken since
its introduction in 1.6 with commit 726ab7145c
("MEDIUM: backend: Allow
redispatch on retry intervals").
As a workaround, "no option redispatch" does work though.
This commit is contained in:
parent
4c361a9d8a
commit
e9b774f4b3
@ -2050,8 +2050,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
|||||||
case KWM_STD:
|
case KWM_STD:
|
||||||
curproxy->options |= PR_O_REDISP;
|
curproxy->options |= PR_O_REDISP;
|
||||||
curproxy->redispatch_after = -1;
|
curproxy->redispatch_after = -1;
|
||||||
if(*args[2]) {
|
if (*args[2]) {
|
||||||
curproxy->redispatch_after = atol(args[2]);
|
curproxy->redispatch_after = atol(args[2]);
|
||||||
|
if (!curproxy->redispatch_after)
|
||||||
|
curproxy->options &= ~PR_O_REDISP;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KWM_NO:
|
case KWM_NO:
|
||||||
|
Loading…
Reference in New Issue
Block a user