]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-h1: Consume channel's data in a loop in h1_snd_buf()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Nov 2018 09:58:42 +0000 (10:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 16:37:27 +0000 (17:37 +0100)
commit5d37dac78594f4c3aa23e49cdca532a21674498a
tree959ff9e4d049c79f28712395f958c1e3078b2afc
parentf96c322664b02ea2772a310ebf4267ade4e54393
MINOR: mux-h1: Consume channel's data in a loop in h1_snd_buf()

In h1_snd_buf(), the data sending is done synchronously, as much as possible. So
if some data remains in the channel's buffer, because there was not enougth
place in the output buffer, it may be good the retry after a send because some
space may have been released when sending. Most of time the output buffer is
empty and all channel's data are consumed the first time. And if no data are
sent, we don't retry to do more. So the loop is just here to optimize edge cases
without any cost for all others.
src/mux_h1.c