]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] health checks: fix requeued message
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Sun, 10 Jan 2010 20:12:58 +0000 (21:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Jan 2010 20:13:12 +0000 (21:13 +0100)
Dummy copy&past is not a good idea. :( Also, we shoud
check "s->state & SRV_RUNNING" instead of xferred.

src/checks.c

index b6f73bd305a4eb4f523331e7b7e89ee28fc4caf9..d61b6bbc1a9557ed019daef9afa0e58378091b6f 100644 (file)
@@ -174,7 +174,7 @@ static void server_status_printf(struct chunk *msg, struct server *s, unsigned o
        }
 
        if (options & SSP_O_STATUS) {
-               if (xferred)
+               if (!(s->state & SRV_RUNNING))
                        chunk_printf(msg, ". %d active and %d backup servers left.%s"
                                " %d sessions active, %d requeued, %d remaining in queue.\n",
                                s->proxy->srv_act, s->proxy->srv_bck,
@@ -458,7 +458,7 @@ static void set_server_up(struct server *s) {
                server_status_printf(&msg, s,
                                        (s->tracked?SSP_O_VIA:0) | SSP_O_STATUS |
                                        ((!s->tracked && !(s->proxy->options2 & PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
-                                       -1);
+                                       xferred);
 
                Warning("%s", trash);
                send_log(s->proxy, LOG_NOTICE, "%s", trash);
@@ -498,7 +498,7 @@ static void set_server_disabled(struct server *s) {
        server_status_printf(&msg, s,
                                (s->tracked?SSP_O_VIA:0) | SSP_O_STATUS |
                                ((!s->tracked && !(s->proxy->options2 & PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
-                               -1);
+                               xferred);
 
        Warning("%s", trash);
        send_log(s->proxy, LOG_NOTICE, "%s", trash);
@@ -535,7 +535,7 @@ static void set_server_enabled(struct server *s) {
        server_status_printf(&msg, s,
                                (s->tracked?SSP_O_VIA:0) | SSP_O_STATUS |
                                ((!s->tracked && !(s->proxy->options2 & PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
-                               -1);
+                               xferred);
 
        Warning("%s", trash);
        send_log(s->proxy, LOG_NOTICE, "%s", trash);