From: Christopher Faulet Date: Wed, 18 Nov 2026 12:00:35 +0000 (+0100) Subject: BUG/MEDIUM: stream: keep channel_auto_close() on the request error path X-Git-Tag: v3.5-dev13~15 X-Git-Url: https://git.kaiwu.me/web/%22data:,/doc/static/%7B@url%7D?a=commitdiff_plain;h=733b95e729b3c0945eb3c86843368a961d5c8e32;p=haproxy.git BUG/MEDIUM: stream: keep channel_auto_close() on the request error path Commit 6c5df88d ("BUG/MEDIUM: stream: reset analyse_exp when analysers are stripped on error") replaced channel_auto_close(req) with req->analyse_exp = TICK_ETERNITY instead of adding the new statement, so auto-close is no longer re-enabled on the client error/timeout path while the remaining request analysers are stripped. The response path correctly kept channel_auto_close(res) and got the analyse_exp reset in addition. Restore channel_auto_close(req) so shutdowns are still forwarded when an unhandled client error is caught, as fixed by b1368adc ("BUG/MEDIUM: stream: Forward shutdowns when unhandled errors are caught"): without it the stream may freeze when no analyser remains and no wakeup happens. This patch must be backported with 6c5df88d to all stable versions. --- diff --git a/src/stream.c b/src/stream.c index e77afc46b..d7e7137ef 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2387,6 +2387,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) if ((scf->flags & SC_FL_ERROR) || req->flags & (CF_READ_TIMEOUT|CF_WRITE_TIMEOUT)) { /* Report it if the client got an error or a read timeout expired */ req->analysers &= AN_REQ_FLT_END; + channel_auto_close(req); req->analyse_exp = TICK_ETERNITY; if (scf->flags & SC_FL_ERROR) { if (s->be_tgcounters)