mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
BUG/MEDIUM: mux-h2; Don't block reveives in H2_CS_ERROR and H2_CS_ERROR2 states
The H2 connection is switched to ERR when a GOAWAY must be sent and in ERR2 when it is sent. In these states, no more data can be emitted by the mux. But there is no reason to not try to process incoming data or to not try to receive data. It is espcially important to be able to get the shutdown from the TCP connection when a SSL connection was previously detected. Otherwise, it is possible to block a H2 connection until its timeout expiration to be able to close it. This patch should be backported to 3.2. But is is probably a good idea to not backport it on older versions, except if a bug is reported in this area.
This commit is contained in:
parent
626d7934cf
commit
c6e4584d2b
@ -1012,7 +1012,7 @@ h2c_is_dead(const struct h2c *h2c)
|
|||||||
*/
|
*/
|
||||||
static inline int h2_recv_allowed(const struct h2c *h2c)
|
static inline int h2_recv_allowed(const struct h2c *h2c)
|
||||||
{
|
{
|
||||||
if ((h2c->flags & (H2_CF_RCVD_SHUT|H2_CF_ERROR)) || h2c->st0 >= H2_CS_ERROR)
|
if (h2c->flags & (H2_CF_RCVD_SHUT|H2_CF_ERROR))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((h2c->wait_event.events & SUB_RETRY_RECV))
|
if ((h2c->wait_event.events & SUB_RETRY_RECV))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user