]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] fix the SIGHUP message not to alert on server-less proxies
authorWilly Tarreau <w@1wt.eu>
Mon, 17 Sep 2007 09:27:09 +0000 (11:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Oct 2007 07:32:15 +0000 (09:32 +0200)
The SIGHUP message was designed long before it was possible to have no
server in a proxy. Remove the alert in case there's no server.

src/haproxy.c

index 791af3ae9dd783982bbce5c6d3aeab7289ecf95c..fe836308ede4fc67a2a126c76068549769b0bd53 100644 (file)
@@ -250,7 +250,13 @@ void sig_dump_state(int sig)
                        s = s->next;
                }
 
-               if (p->srv_act == 0) {
+               /* FIXME: those info are a bit outdated. We should be able to distinguish between FE and BE. */
+               if (!p->srv) {
+                       snprintf(trash, sizeof(trash),
+                                "SIGHUP: Proxy %s has no servers. Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %d+%d.",
+                                p->id,
+                                p->feconn, p->beconn, p->totpend, p->nbpend, p->cum_feconn, p->cum_beconn);
+               } else if (p->srv_act == 0) {
                        snprintf(trash, sizeof(trash),
                                 "SIGHUP: Proxy %s %s ! Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %d+%d.",
                                 p->id,