BUG/MINOR: promex: Set conn-stream/channel EOI flags at the end of request
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Mar 2022 14:56:20 +0000 (15:56 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Mar 2022 10:05:30 +0000 (11:05 +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 bef64b23b7e7b4cdcfa201f17053ee58f43c6802)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 87d74d5655e02a0d845ed06e55e0d21f24d54096)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 069c460afc47f31856bb609810a60dd4ff437b60)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

contrib/prometheus-exporter/service-prometheus.c

index 6d3dcc3..a0e4c75 100644 (file)
@@ -2365,6 +2365,7 @@ static void promex_appctx_handle_io(struct appctx *appctx)
                                goto out;
                        }
                        channel_add_input(res, 1);
+                       res->flags |= CF_EOI;
                        appctx->st0 = PROMEX_ST_END;
                        /* fall through */