mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-19 12:10:46 +00:00
BUG/MEDIUM: mux-h1: Notify the stream waiting for TCP splicing if ibuf is empty
When a stream-interface want to use the TCP splicing to forward its data, it notifies the mux h1. We will then flush the input buffer and don't read more data. So the stream-interface will not be notified for read anymore, except if an error or a read0 is detected. It is a problem everytime the receive I/O callback is called again. It happens when the pipe is full or when no data are received on the pipe. It also happens when the input buffer is freshly flushed. Because the TCP splicing is enabled, nothing is done in h1_recv() and the stream-interface is never woken up. So, now, in h1_recv(), if the TCP splicing is used and the input buffer is empty, the stream-interface is notified for read. This patch must be backported to 1.9.
This commit is contained in:
parent
2f320ee59c
commit
f7d5ff37e0
10
src/mux_h1.c
10
src/mux_h1.c
@ -1723,13 +1723,15 @@ static int h1_recv(struct h1c *h1c)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (h1s && (h1s->flags & (H1S_F_BUF_FLUSH|H1S_F_SPLICED_DATA))) {
|
||||
rcvd = 1;
|
||||
if (!h1_get_buf(h1c, &h1c->ibuf)) {
|
||||
h1c->flags |= H1C_F_IN_ALLOC;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!h1_get_buf(h1c, &h1c->ibuf)) {
|
||||
h1c->flags |= H1C_F_IN_ALLOC;
|
||||
if (h1s && (h1s->flags & (H1S_F_BUF_FLUSH|H1S_F_SPLICED_DATA))) {
|
||||
if (!b_data(&h1c->ibuf))
|
||||
h1_wake_stream_for_recv(h1s);
|
||||
rcvd = 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user