mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-09 09:01:51 +01:00
BUG/MEDIUM: mux-h2: Remove H2S from send list if data are sent via 0-copy FF
When data are sent via the zero-copy data forwarding, in h2_done_ff, we must be sure to remove the H2 stream from the send list if something is send. It was only performed if no blocking condition was encountered. But we must also do it if something is sent. Otherwise the transfer may be blocked till timeout. This patch must be backported as far as 2.9.
This commit is contained in:
parent
529e4f36a3
commit
ded28f6e5c
14
src/mux_h2.c
14
src/mux_h2.c
@ -7860,13 +7860,6 @@ static size_t h2_done_ff(struct stconn *sc)
|
||||
h2s->flags &= ~H2_SF_MORE_HTX_DATA;
|
||||
}
|
||||
|
||||
if (!(sd->iobuf.flags & IOBUF_FL_FF_BLOCKED) &&
|
||||
!(h2s->flags & H2_SF_BLK_SFCTL) &&
|
||||
!(h2s->flags & (H2_SF_WANT_SHUTR|H2_SF_WANT_SHUTW))) {
|
||||
/* Ok we managed to send something, leave the send_list if we were still there */
|
||||
h2_remove_from_list(h2s);
|
||||
}
|
||||
|
||||
if (!sd->iobuf.data)
|
||||
goto end;
|
||||
|
||||
@ -7901,6 +7894,13 @@ static size_t h2_done_ff(struct stconn *sc)
|
||||
if (!(sd->iobuf.flags & IOBUF_FL_INTERIM_FF))
|
||||
h2s->flags &= ~H2_SF_NOTIFIED;
|
||||
|
||||
if ((total || !(sd->iobuf.flags & IOBUF_FL_FF_BLOCKED)) &&
|
||||
!(h2s->flags & H2_SF_BLK_SFCTL) &&
|
||||
!(h2s->flags & (H2_SF_WANT_SHUTR|H2_SF_WANT_SHUTW))) {
|
||||
/* Ok we managed to send something, leave the send_list if we were still there */
|
||||
h2_remove_from_list(h2s);
|
||||
}
|
||||
|
||||
TRACE_LEAVE(H2_EV_H2S_SEND|H2_EV_STRM_SEND, h2s->h2c->conn, h2s);
|
||||
return total;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user