]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: fix the conditions to end the h2_send() loop
authorWilly Tarreau <w@1wt.eu>
Wed, 29 May 2019 15:36:37 +0000 (17:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 May 2019 15:54:35 +0000 (17:54 +0200)
commit7f1265a238a1a7b1133bc8a2aaea80245c1a289f
treec47a066329821aeac65139243dea44eec8e64282
parent58d87f31f7391d419182d61743bbe82524f8fd5a
BUG/MEDIUM: mux-h2: fix the conditions to end the h2_send() loop

The test for the mux alloc failure in h2_send() right after an attempt
at h2_process_mux() used to make sense as it tried to detect that this
latter failed to produce data. But now that we have a list of buffers,
it is a perfectly valid situation where there can still be data in the
buffer(s).

So now when we see this flag we only declare it's the last run on the
loop. In addition we need to make sure we break out of the loop on
snd_buf failure, or we'll loop indefinitely, for example when the buf
is full and we can't send.

No backport is needed.
src/mux_h2.c