MINOR: mux-h1: Subscribe for sends if output buffer is not empty in h1_snd_pipe
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 6 Apr 2021 15:27:32 +0000 (17:27 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 May 2021 07:21:00 +0000 (09:21 +0200)
commit8454f2dbbc0bf4d9e307e9a0269a3de7413fd49a
tree4c1095ade116bbbcd85f5c29dfb4d1ebda03beb7
parent2b861bf723841d921715961dba7eb4f4253e1cb0
MINOR: mux-h1: Subscribe for sends if output buffer is not empty in h1_snd_pipe

In h1_snd_pipe(), before sending spliced data, we take care to flush the
output buffer by subscribing for sends. However, the condition to do so is
not accurate. We test data remaining in the pipe. It works but it also
unnecessarily subscribes H1C for sends when the output buffer is empty if we
are unable to send all spliced data in one time. Instead, H1C is now
subscribed for sends if output buffer is not empty.
src/mux_h1.c