mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 04:56:10 +02:00
BUG/MEDIUM: mux-h2: immediately report connection errors on streams
In case a stream tries to send on a connection error, we must report the error so that the stream interface keeps the data available and may safely retry on another connection. Till now this would happen only before the connection was established, not in case of a failed handshake or an early GOAWAY for example. This should be backported to 2.0 and 1.9.
This commit is contained in:
parent
4481e26e5d
commit
cab2295ae7
@ -5838,6 +5838,12 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (h2s->h2c->st0 >= H2_CS_ERROR) {
|
||||
cs->flags |= CS_FL_ERROR;
|
||||
TRACE_DEVEL("connection is in error, leaving in error", H2_EV_H2S_SEND|H2_EV_H2S_BLK|H2_EV_H2S_ERR|H2_EV_STRM_ERR, h2s->h2c->conn, h2s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
htx = htx_from_buf(buf);
|
||||
|
||||
if (!(h2s->flags & H2_SF_OUTGOING_DATA) && count)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user