]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux-h1: don't spread-close idle conns with idle-close-on-response
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 16:12:50 +0000 (18:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2026 17:10:27 +0000 (19:10 +0200)
commit15be046d48fa06cd507f5e13714f112183f2174c
tree86fecbe8740fb0106f2346b193189b51b1437553
parent226b8fcb8763fc10a2365a719d54ad8470504e03
BUG/MEDIUM: mux-h1: don't spread-close idle conns with idle-close-on-response

With "option idle-close-on-response", idle frontend connections must not be
closed during a soft-stop: haproxy waits for the next request and closes the
connection after responding to it, so that clients (or load balancers in
front of haproxy) don't send a request on a connection being
closed. h1_process() properly checks this option before closing an idle
connection when the proxy is stopping. But when "close-spread-time" is set,
h1_refresh_timeout() also considers idle frontend connections as candidates
to be closed during the spread window, without checking the option, and
shortens their timeout to a random point within the window.  The timeout
task then silently closes them.

Let's not consider idle connections for the spread close when the option is
set, as done in h1_process().

This should be backported as far as 2.6.
src/mux_h1.c