From adceb4a595d9dedbcdc1bbf92b38ccc95c2b66ab Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 24 Oct 2024 11:53:10 +0200 Subject: [PATCH] BUG/MINOR: stconn: Don't disable 0-copy FF if EOS was reported on consumer side There is no reason to disable the 0-copy data forwarding if an end-of-stream was reported on the consumer side. Indeed, the consumer will send data in this case. So there is no reason to check the read side here. This patch may be backported as far as 2.9. (cherry picked from commit 362de90f3e4ddd0c15331c6b9cb48b671a6e2385) Signed-off-by: Christopher Faulet --- include/haproxy/stconn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/haproxy/stconn.h b/include/haproxy/stconn.h index e6548a6..1797220 100644 --- a/include/haproxy/stconn.h +++ b/include/haproxy/stconn.h @@ -476,8 +476,8 @@ static inline size_t se_nego_ff(struct sedesc *se, struct buffer *input, size_t se->iobuf.flags &= ~(IOBUF_FL_FF_BLOCKED|IOBUF_FL_FF_WANT_ROOM); if (mux->nego_fastfwd && mux->done_fastfwd) { - /* Disable zero-copy forwarding if EOS or an error was reported. */ - if (se_fl_test(se, SE_FL_EOS|SE_FL_ERROR|SE_FL_ERR_PENDING)) { + /* Disable zero-copy forwarding if an error was reported. */ + if (se_fl_test(se, SE_FL_ERROR|SE_FL_ERR_PENDING)) { se->iobuf.flags |= IOBUF_FL_NO_FF; goto end; } -- 1.7.10.4