]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: cli: properly handle closed output
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 18:06:08 +0000 (20:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 19:16:03 +0000 (21:16 +0200)
Due to the code inherited from the early CLI mode with the non-interactive
code, the SHUTR status was only considered while waiting for a request,
which prevents the connection from properly being closed during a dump,
and the connection used to remain established. This issue didn't happen
in 1.5 because while this part was missed, the resynchronization performed
in process_session() would detect the situation and handle the cleanup.

No backport is needed.

src/dumpstats.c

index c86ba4d1cd765b97e50b1e71ca6cb0e9b86792f2..87e62eb7f65252c20897acf865bf0dcfb29ea0c7 100644 (file)
@@ -2586,7 +2586,7 @@ static void cli_io_handler(struct appctx *appctx)
                }
        }
 
-       if ((res->flags & CF_SHUTR) && (si->state == SI_ST_EST) && (appctx->st0 != STAT_CLI_GETREQ)) {
+       if ((res->flags & CF_SHUTR) && (si->state == SI_ST_EST)) {
                DPRINTF(stderr, "%s@%d: si to buf closed. req=%08x, res=%08x, st=%d\n",
                        __FUNCTION__, __LINE__, req->flags, res->flags, si->state);
                /* Other side has closed, let's abort if we have no more processing to do