]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Fix freeze when the kernel splicing is used
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 19 Nov 2018 20:52:12 +0000 (21:52 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Nov 2018 13:31:44 +0000 (14:31 +0100)
commitd44ad5b8bd94510fc3e4353f06223be457e5b018
treef239fb62a2d0b5112f44ac756bf049d9b93bbe8b
parent81d484326b25ee585d1b9176475ef24db433e77c
BUG/MEDIUM: mux-h1: Fix freeze when the kernel splicing is used

First of all, we need to be sure to keep the flag H1S_F_BUF_FLUSH on the H1S
reading data until all data was flushed from the buffer. Then we need to know
when the kernel splicing is in use and when it ends. This is handled with the
new flag H1S_F_SPLICED_DATA.

Then, we must subscribe to send when some data remain in the pipe after a
snd_pipe(). It is mandatory to wakeup the stream and avoid a freeze.

Finally, we must be sure to update the message state when we restart to use the
channel's buffer. Among other things, it is mandatory to swith the message from
DATA to DONE state when all data were sent using the kernel splicing.
src/mux_h1.c