]> git.ipfire.org Git - thirdparty/haproxy.git/commit
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:39:04 +0000 (14:39 +0200)
commite9cdedb39b2020a7eb1ae5d8462b391d4301fb93
treea8359de1cc94aae0f1685a7802c1c89614dba0c8
parent0d4271cdae18780de79e1ce997d562f91eeee316
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.
src/mux_h2.c