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.
This commit is contained in:
Olivier Houchard 2019-07-26 15:11:11 +02:00 committed by Olivier Houchard
parent 41f638c1eb
commit cc3fec8ac9

View File

@ -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; rcvd = 1;
goto end; goto end;
} }