]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: qmux: prevent pacing BUG_ON() on send syscall zero return
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 17 Nov 2026 15:15:48 +0000 (16:15 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 23 Nov 2026 13:54:31 +0000 (14:54 +0100)
commit8fc9f0131326ba54a8824fdddaec744299046be9
tree9479fe7cbe816a39a1beea25107b878fe0ddab61
parentbd744d18517fb64b20d41a9f1b87eebf3b286973
BUG/MINOR: qmux: prevent pacing BUG_ON() on send syscall zero return

Previously, qcc_qmux_send_frames() would return 1 in case a send failed
on a transient error while nothing was emitted. However, this may
trigger a BUG_ON() in qcc_io_send() as this return value is reserved for
QUIC pacing support, not relevant with QMux.

Fix this by converting the return value to a negative value, which is
already used for fatal errors.

The caller is responsible for re-emitting the new the frame later. As
such, the prepared record is cleared from the send buffer to avoid a
duplicate emission on initial flush.

Note that this patch does not implement full support for QMux partial
emission if the send syscall accepts some but not all bytes, resulting
in a partially delivered frame. This must be implemented in a future
patch. Once this is the case, all code related to the handling of send
zero return can probably be removed.

This must be backported up to 3.4.
src/qcm_qmux.c