]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: Switch pending error to error if demux buffer is empty
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Dec 2023 16:53:52 +0000 (17:53 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Dec 2023 20:15:32 +0000 (21:15 +0100)
commit5b78cbae770e9debab186c4bbf2b708eb4561007
tree87978db7c6fc778256b80922f6d54a0f9832378c
parent693da29ab71d28346bb1a16e4dacc2bf3add3081
BUG/MEDIUM: mux-h2: Switch pending error to error if demux buffer is empty

When an error on the H2 connection is detected when sending data, only a
pending error is reported, waiting for an error or a shutdown on the read
side. However if a shutdown was already received, the pending error is
switched to a definitive error.

At this stage, we must also wait to have flushed the demux
buffer. Otherwise, if some data must still be demux, messages for one or
more streams may be truncated. There is already the flag H2_CF_END_REACHED
to know a shutdown was received and we no longer progress on demux side
(buffer empty or data truncated). On sending side, we should use this flag
instead to report a definitive error.

This patch is part of a series that should fix a bug reported in issue #2388
(#2388#issuecomment-1855735144). Backport instructions will be shipped in
the last commit of the series.
src/mux_h2.c