From e13e9251a6db960c0db7b69107f7ea22b1c894f5 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 20 Dec 2007 23:05:50 +0100 Subject: [PATCH] [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. --- src/haproxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 887c162e8..156545d2a 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -851,7 +851,8 @@ int main(int argc, char **argv) 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;