From: Olivier Houchard Date: Fri, 26 Jul 2019 13:11:11 +0000 (+0200) Subject: MEDIUM: h1: Don't try to subscribe if we managed to read data. X-Git-Tag: v2.1-dev2~277 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc3fec8ac93f2f7d00ddabe0eba4b68a43285d1a;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index f4243a2252..854099de3d 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; }