]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: applet: State appctx have more data if its EOI/EOS/ERROR flag is set
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 15 Feb 2024 16:27:08 +0000 (17:27 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Mar 2024 16:28:21 +0000 (17:28 +0100)
It is an harmless bug for now because only stats and cache applets are using
their own buffers and it is not possible to trigger this bug with these
applets. However, it remains important to try a receive if EOI, EOS or ERROR
is reached by the applet while no data was produced. Otherwise, it is not
possible to ack these events at the SE level.

No backport needed.

src/applet.c

index def5c2aff64ab1d7140fd94dd913e901b849339c..90aa89f5daac1910faa40f0730c4880b7d78a46e 100644 (file)
@@ -910,7 +910,8 @@ struct task *task_process_applet(struct task *t, void *context, unsigned int sta
 
        TRACE_POINT(APPLET_EV_PROCESS, app);
 
-       if (b_data(&app->outbuf) || se_fl_test(app->sedesc, SE_FL_MAY_FASTFWD_PROD))
+       if (b_data(&app->outbuf) || se_fl_test(app->sedesc, SE_FL_MAY_FASTFWD_PROD) ||
+           applet_fl_test(app, APPCTX_FL_EOI|APPCTX_FL_EOS|APPCTX_FL_ERROR))
                applet_have_more_data(app);
 
        sc_applet_sync_recv(sc);