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.13.2~6 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=fbffe58f46696d17fc9d248cb3db6aec95d6c132;p=haproxy.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 1108ea994..474878688 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -817,7 +817,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;