From 5fcc8f1ed9e6f2c54828f7d06c864c1375aafba9 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 17 Sep 2007 11:27:09 +0200 Subject: [PATCH] [MINOR] fix the SIGHUP message not to alert on server-less proxies 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 791af3ae9..fe836308e 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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,