From: Willy Tarreau Date: Thu, 20 Dec 2007 22:05:50 +0000 (+0100) Subject: [BUG] hot reconfiguration failed because of a wrong error check X-Git-Tag: v1.3.14.1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e13e9251a6db960c0db7b69107f7ea22b1c894f5;p=thirdparty%2Fhaproxy.git [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 887c162e85..156545d2a7 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;