]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MEDIUM: stream: keep channel_auto_close() on the request error path
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Nov 2026 12:00:35 +0000 (13:00 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Nov 2026 12:01:32 +0000 (13:01 +0100)
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.

src/stream.c

index e77afc46b257d124224e8e545282aac40925a6ad..d7e7137ef304e4f2990d28919a8025f6bbf7145a 100644 (file)
@@ -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)