[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 791af3a..fe83630 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -250,7 +250,13 @@
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,