[MINOR] report total number of processed connections when stopping a proxy
It's sometimes convenient to know if a proxy has processed any connection
at all when stopping it. Since a soft restart causes the "Proxy stopped"
message to be logged for each proxy, let's add the number of connections
so that it's possible afterwards to check whether a proxy had received
any connection.
diff --git a/src/proxy.c b/src/proxy.c
index 41bf1cf..57506d9 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -529,8 +529,10 @@
int t;
t = tick_remain(now_ms, p->stop_time);
if (t == 0) {
- Warning("Proxy %s stopped.\n", p->id);
- send_log(p, LOG_WARNING, "Proxy %s stopped.\n", p->id);
+ Warning("Proxy %s stopped (FE: %lld conns, BE: %lld conns).\n",
+ p->id, p->counters.cum_feconn, p->counters.cum_beconn);
+ send_log(p, LOG_WARNING, "Proxy %s stopped (FE: %lld conns, BE: %lld conns).\n",
+ p->id, p->counters.cum_feconn, p->counters.cum_beconn);
stop_proxy(p);
/* try to free more memory */
pool_gc2();