BUG/MEDIUM: mux-h1: Handle delayed silent shut in h1_process() to release H1C
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Nov 2021 13:51:37 +0000 (14:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Nov 2021 14:03:21 +0000 (15:03 +0100)
commit7530830414d5b92a31cb327201f9bc4d50a6ea64
tree662592e612bc1ae6eb071a635d8ea04005fd30e7
parent1ccbe12f4a6af471bdbc8b85f98eb16ae3e4a626
BUG/MEDIUM: mux-h1: Handle delayed silent shut in h1_process() to release H1C

The commit a85c522d4 ("BUG/MINOR: mux-h1: Save shutdown mode if the shutdown
is delayed") revealed several hidden bugs in connection's shutdown
handling. One of them is about delayed silent shudown.

If outgoing data are not fully sent, we delayed the shutdown. However, in
h1_process(), only normal (or clean) shutdown are really detected. If a
silent (or dirty) shutdown is performed, the H1 connection is not
immediately released. Of course, in this situation, the client never
acknowledged the shutdown. Thus, the H1 connection remains open till the
client timeout.

This patch should fix the issues #1448 and #1453. It must be backported as
far as 2.0.
src/mux_h1.c