]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: do not call cli_release_handler 3 times
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 17:21:19 +0000 (19:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 19:16:02 +0000 (21:16 +0200)
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.

src/dumpstats.c

index 39bdd17142bc3631061917a81efa62f357ebd09c..c86ba4d1cd765b97e50b1e71ca6cb0e9b86792f2 100644 (file)
@@ -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)