From: Willy Tarreau Date: Tue, 13 May 2014 22:09:59 +0000 (+0200) Subject: BUG/MINOR: stats: do not report "100%" in the thottle column when server is draining X-Git-Tag: v1.5-dev26~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e21f84903ef334c02f2783b20a128f381263e676;p=thirdparty%2Fhaproxy.git BUG/MINOR: stats: do not report "100%" in the thottle column when server is draining A condition was missing and we used to have "throttle 100%" even when the server was draining connections, which is misleading but harmless. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 13843f893b..5bfada7a9b 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -2987,7 +2987,7 @@ static int stats_dump_sv_stats(struct stream_interface *si, struct proxy *px, in chunk_appendf(&trash, ""); /* throttle */ - if (sv->state & SRV_WARMINGUP) + if ((sv->state & SRV_WARMINGUP) && !server_is_draining(sv)) chunk_appendf(&trash, "%d %%\n", server_throttle_rate(sv)); else chunk_appendf(&trash, "-\n"); @@ -3065,7 +3065,7 @@ static int stats_dump_sv_stats(struct stream_interface *si, struct proxy *px, in relative_pid, px->uuid, sv->puid); /* throttle */ - if (sv->state & SRV_WARMINGUP) + if ((sv->state & SRV_WARMINGUP) && !server_is_draining(sv)) chunk_appendf(&trash, "%d", server_throttle_rate(sv)); /* sessions: lbtot */