]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: quic: refuse handshakes completed after the listener unbind
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 19 Nov 2026 17:00:34 +0000 (18:00 +0100)
committerOlivier Houchard <cognet@ci0.org>
Thu, 19 Nov 2026 17:27:40 +0000 (18:27 +0100)
commitf569d81646c47c851bb66a895f5160f3edbf69f5
tree4ad79599bcea78d4d95311197ee95fba5518b824
parent9c3a95c2c6485e46aeafd9a6a9975d5d00a14c1a
BUG/MEDIUM: quic: refuse handshakes completed after the listener unbind

QUIC connections are accepted once their handshake is complete. When a
soft-stop unbinds the listener in the meantime, the connection is still
queued, but listener_accept() does not call accept_conn() anymore on the
unbound receiver. The connection never gets its mux and the client waits
until its timeout, while the stopping process keeps it until its idle
timeout and quic_accept_run() wakes itself up in a loop, using 100% of a
thread.

Let's close such connections with a CONNECTION_REFUSED error instead,
when their handshake completes on an unbound listener, or when they are
still queued once it is unbound. The client gets the error right after
its handshake and the stopping process can leave.

This was introduced in 2.8 with the soft-stop support for connections
with their own socket, by commit fb375574f ("MINOR: quic: mark quic-conn
as jobs on socket allocation"). It should be backported to all stable
versions.

This was reported in GitHub issue #3578.
src/quic_sock.c