]> git.kaiwu.me - haproxy.git/commit
CLEANUP: mux-h2: remove the outdated condition to release h2c on timeout
authorWilly Tarreau <w@1wt.eu>
Mon, 4 May 2026 09:57:12 +0000 (11:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 May 2026 10:01:57 +0000 (12:01 +0200)
commit0896ea43fc5ac21182f57dd8eb79db2e41321d63
tree9ad4ac8807c9064cb861e71bd4fdaffca2a6d67d
parent95ea3c5510a75950646e9d2d6ffa2305668b6fe0
CLEANUP: mux-h2: remove the outdated condition to release h2c on timeout

The historical code dealing with timeout was left with a confusing
condition that is always true but always requires some analysis. It
would check if some streams were left pending before deciding to
release the connection. It could indeed be problematic to leave with
no timeout and an active connection!

As Christopher figured, the situation cannot exist because a first
check ensures there's no more h2c via h2c_may_expire(), then a call
to h2_wake_some_streams() will call h2s_wake_one_stream() for each
of the h2s, and all those with no h2c are purged. Thus on return
from h2_wake_some_streams() we're guaranteed to have an empty tree.

Let's just remove the condition and clean up the code.
src/mux_h2.c