From cc3fec8ac93f2f7d00ddabe0eba4b68a43285d1a Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 26 Jul 2019 15:11:11 +0200 Subject: [PATCH] MEDIUM: h1: Don't try to subscribe if we managed to read data. In h1_recv(), don't subscribe if we managed to receive data. We may not have to, if we received a complete request, and a new receive will be attempted later, as the tasklet is woken up either by h1_rcv_buf() or by h1_detach. --- src/mux_h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index f4243a225..854099de3 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1945,7 +1945,7 @@ static int h1_recv(struct h1c *h1c) } } - if (!h1_recv_allowed(h1c) || !buf_room_for_htx_data(&h1c->ibuf)) { + if (ret > 0 || !h1_recv_allowed(h1c) || !buf_room_for_htx_data(&h1c->ibuf)) { rcvd = 1; goto end; }