[BUG] hot reconfiguration failed because of a wrong error check
The error check in return of start_proxies checked for exact ERR_RETRYABLE
but did not consider the return as a bit field. The function returned both
ERR_RETRYABLE and ERR_ALERT, hence the problem.
diff --git a/src/haproxy.c b/src/haproxy.c
index 887c162..156545d 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -851,7 +851,8 @@
while (retry >= 0) {
struct timeval w;
err = start_proxies(retry == 0 || nb_oldpids == 0);
- if (err != ERR_RETRYABLE)
+ /* exit the loop on no error or fatal error */
+ if ((err & (ERR_RETRYABLE|ERR_FATAL)) != ERR_RETRYABLE)
break;
if (nb_oldpids == 0)
break;