MINOR: mux-h2: try to clear DEM_MROOM and MUX_MFULL at more places
authorWilly Tarreau <w@1wt.eu>
Mon, 2 Sep 2024 13:14:16 +0000 (15:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Sep 2024 12:59:09 +0000 (14:59 +0200)
commitd636e515453320c6e122c313c661a8ac7d387c7f
tree57e40ae6d6f8309649c1ef57c2f213d1bafae358
parentdfefb9953e795c71aabd714986f59ad285f7e7f5
MINOR: mux-h2: try to clear DEM_MROOM and MUX_MFULL at more places

The code leading to H2_CF_MUX_MFULL and H2_CF_DEM_MROOM being cleared
is quite complex and assumptions about its state are extremely difficult
when reading the code. There are indeed long sequences where the mux might
possibly be empty, still having the flag set until it reaches h2_send()
which will clear it after the last send. Even then it's not obviour whether
it's always guaranteed to release the flag when invoked in multiple passes.
Let's just simplify the conditionnn so that h2_send() does not depend on
"sent" anymore and that h2_timeout_task() doesn't leave the flags set on
the buffer on emptiness. While it doesn't seem to fix anything, it will
make the code more robust against future changes.

(cherry picked from commit e9cdedb39b2020a7eb1ae5d8462b391d4301fb93)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/mux_h2.c