]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] hot reconfiguration failed because of a wrong error check
authorWilly Tarreau <w@1wt.eu>
Thu, 20 Dec 2007 22:05:50 +0000 (23:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Dec 2007 22:09:54 +0000 (23:09 +0100)
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

index 887c162e85c8dd528496d2ad1f182003ec2a80a1..156545d2a7c7231a734d240f841eea13881bf524 100644 (file)
@@ -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;