From: Willy Tarreau Date: Fri, 25 Sep 2015 18:06:08 +0000 (+0200) Subject: BUG/MEDIUM: cli: properly handle closed output X-Git-Tag: v1.6-dev6~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9e930accc9c8a9788c464c15127b3174e74d6fd;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: cli: properly handle closed output 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. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index c86ba4d1cd..87e62eb7f6 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -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