]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: Properly handle shutdowns when received with data
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 23 Apr 2021 10:25:18 +0000 (12:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 23 Apr 2021 13:42:39 +0000 (15:42 +0200)
commitde9d605aa56d257e3720f080a8c7f30b54fa6543
tree15d07d3a9a7871e15c2e48b0991d6a4a9532833e
parent5e65f4276b4db6e1de7657a5fdff51ddc0a1429c
BUG/MEDIUM: mux-h2: Properly handle shutdowns when received with data

The H2_CF_RCVD_SHUT flag is used to report a read0 was encountered. It is
used by the H2 mux to properly handle shutdowns. However, this flag is only
set when no data are received. If it is detected at the socket level when
some data are received, it is not handled. And because the event was
reported on the connection, any other read attempts are blocked. In this
case, we are unable to close the connection and release the mux
immediately. We must wait the mux timeout expires.

This patch should fix the issue #1231. It must be backported as far as 2.0.
src/mux_h2.c