From: Willy Tarreau Date: Thu, 8 Feb 2024 16:22:41 +0000 (+0100) Subject: MINOR: cli: make sure to always print a pending message after release() X-Git-Tag: v3.0-dev3~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d91ffdaff471e95bfd6eb6f9a98eaa4e035aa3d;p=thirdparty%2Fhaproxy.git MINOR: cli: make sure to always print a pending message after release() If a release handler produces a final message, it's currently left pending in the CLI context and needs another I/O event to be dumped because immediately after calling ->release, we check for states OUTPUT and above and we wait until more data arrives. This patch adds continue statement to go back to the loop immediately after leaving the release handler in order to attempt to emit the output message. At this point it's not sure whether any release handlers are producing messages, so it's probably not needed to backport this. --- diff --git a/src/cli.c b/src/cli.c index ec5ae44c58..cbfec88dfe 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1150,6 +1150,10 @@ static void cli_io_handler(struct appctx *appctx) if (appctx->io_release) { appctx->io_release(appctx); appctx->io_release = NULL; + /* some release handlers might have + * pending output to print. + */ + continue; } } break;