mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 08:37:04 +02:00
BUG/MINOR: mux-h1: Don't read data from a pipe if the mux is unable to receive
In h1_rcv_pipe(), if the mux is unable to receive data, for instance because the multiplexer is blocked on input waiting the other side (BUSY mode), no receive must be performed. This patch must be backported to 2.1 and 2.0.
This commit is contained in:
parent
2eaf30955f
commit
0060be9ccf
@ -2781,6 +2781,12 @@ static int h1_rcv_pipe(struct conn_stream *cs, struct pipe *pipe, unsigned int c
|
|||||||
h1s->flags &= ~H1S_F_BUF_FLUSH;
|
h1s->flags &= ~H1S_F_BUF_FLUSH;
|
||||||
h1s->flags |= H1S_F_SPLICED_DATA;
|
h1s->flags |= H1S_F_SPLICED_DATA;
|
||||||
TRACE_STATE("enable splicing", H1_EV_STRM_RECV, cs->conn, h1s);
|
TRACE_STATE("enable splicing", H1_EV_STRM_RECV, cs->conn, h1s);
|
||||||
|
|
||||||
|
if (!h1_recv_allowed(h1s->h1c)) {
|
||||||
|
TRACE_DEVEL("leaving on !recv_allowed", H1_EV_STRM_RECV, cs->conn, h1s);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (h1m->state == H1_MSG_DATA && count > h1m->curr_len)
|
if (h1m->state == H1_MSG_DATA && count > h1m->curr_len)
|
||||||
count = h1m->curr_len;
|
count = h1m->curr_len;
|
||||||
ret = cs->conn->xprt->rcv_pipe(cs->conn, cs->conn->xprt_ctx, pipe, count);
|
ret = cs->conn->xprt->rcv_pipe(cs->conn, cs->conn->xprt_ctx, pipe, count);
|
||||||
|
Loading…
Reference in New Issue
Block a user