From: Willy Tarreau Date: Fri, 25 Sep 2015 17:21:19 +0000 (+0200) Subject: BUG/MINOR: stats: do not call cli_release_handler 3 times X-Git-Tag: v1.6-dev6~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68c00c71853de901eebca44d64623db4748dd532;p=thirdparty%2Fhaproxy.git BUG/MINOR: stats: do not call cli_release_handler 3 times If an error happens during a dump on the CLI, an explicit call to cli_release_handler() is performed. This is not needed anymore since we introduced ->release() in the applet which is called upon error. Let's remove this confusing call which can even be risky in some situations. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 39bdd17142..c86ba4d1cd 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -2482,13 +2482,7 @@ static void cli_io_handler(struct appctx *appctx) bo_skip(si_oc(si), reql); req->flags |= CF_READ_DONTWAIT; /* we plan to read small requests */ } - else { /* output functions: first check if the output buffer is closed then abort */ - if (res->flags & (CF_SHUTR_NOW|CF_SHUTR)) { - cli_release_handler(appctx); - appctx->st0 = STAT_CLI_END; - continue; - } - + else { /* output functions */ switch (appctx->st0) { case STAT_CLI_PRINT: if (bi_putstr(si_ic(si), appctx->ctx.cli.msg) != -1)