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.
case KWM_STD:
curproxy->options |= PR_O_REDISP;
curproxy->redispatch_after = -1;
- if(*args[2]) {
+ if (*args[2]) {
curproxy->redispatch_after = atol(args[2]);
+ if (!curproxy->redispatch_after)
+ curproxy->options &= ~PR_O_REDISP;
}
break;
case KWM_NO: