BUG/MINOR: stats: Set conn-stream/channel EOI flags at the end of request
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Mar 2022 14:52:42 +0000 (15:52 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Mar 2022 10:03:22 +0000 (11:03 +0100)
This bug is the same than for the HTTP client. See "BUG/MINOR: httpclient:
Set conn-stream/channel EOI flags at the end of request" for details.

This patch must be backported as far as 2.0. But only CF_EOI must be set
because applets are not attached to a conn-stream on older versions.

(cherry picked from commit 3fa5d19d14e70986d366e7c21554a434c1daa64b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 9262914ef6c8c5158ed99bd108beedf4df306572)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 6adbd9d34c07aff72366c73f368bee487fff86d0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

src/stats.c

index 6426d94..365bc7e 100644 (file)
@@ -3729,6 +3729,7 @@ static void http_stats_io_handler(struct appctx *appctx)
                        goto out;
                }
                channel_add_input(&s->res, 1);
+               res->flags |= CF_EOI;
                appctx->st0 = STAT_HTTP_END;
        }