From 3d91ffdaff471e95bfd6eb6f9a98eaa4e035aa3d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 8 Feb 2024 17:22:41 +0100 Subject: [PATCH] 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. --- src/cli.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli.c b/src/cli.c index ec5ae44c5..cbfec88df 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;