From: Willy Tarreau Date: Mon, 17 Sep 2007 09:27:09 +0000 (+0200) Subject: [MINOR] fix the SIGHUP message not to alert on server-less proxies X-Git-Tag: v1.3.13~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fcc8f1ed9e6f2c54828f7d06c864c1375aafba9;p=thirdparty%2Fhaproxy.git [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. --- diff --git a/src/haproxy.c b/src/haproxy.c index 791af3ae9d..fe836308ed 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,