mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
BUG/MEDIUM: h2: Don't check send_wait to know if we're in the send_list.
When we have to stop sending due to the stream flow control, don't check if send_wait is NULL to know if we're in the send_list, because at this point it'll always be NULL, while we're probably in the list. Use LIST_ISEMPTY(&h2s->list) instead. Failing to do so mean we might be added in the send_list when flow control allows us to emit again, while we're already in it. While I'm here, replace LIST_DEL + LIST_INIT by LIST_DEL_INIT. This should be backported to 1.9.
This commit is contained in:
parent
132f7b496c
commit
bfe2a83c24
12
src/mux_h2.c
12
src/mux_h2.c
@ -4160,10 +4160,8 @@ static size_t h2s_frt_make_resp_data(struct h2s *h2s, const struct buffer *buf,
|
||||
|
||||
if (size <= 0) {
|
||||
h2s->flags |= H2_SF_BLK_SFCTL;
|
||||
if (h2s->send_wait) {
|
||||
LIST_DEL(&h2s->list);
|
||||
LIST_INIT(&h2s->list);
|
||||
}
|
||||
if (!LIST_ISEMPTY(&h2s->list))
|
||||
LIST_DEL_INIT(&h2s->list);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@ -4907,10 +4905,8 @@ static size_t h2s_htx_frt_make_resp_data(struct h2s *h2s, struct buffer *buf, si
|
||||
|
||||
if (h2s->mws <= 0) {
|
||||
h2s->flags |= H2_SF_BLK_SFCTL;
|
||||
if (h2s->send_wait) {
|
||||
LIST_DEL(&h2s->list);
|
||||
LIST_INIT(&h2s->list);
|
||||
}
|
||||
if (!LIST_ISEMPTY(&h2s->list))
|
||||
LIST_DEL_INIT(&h2s->list);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user