1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

h2: do not wait for RECV on paused transfers

... as the socket might be readable all the time when paused and thus
causing a busy-loop.

Reported-by: Harry Sintonen
Reviewed-by: Jay Satiro
Fixes #6356
Closes #6357
This commit is contained in:
Daniel Stenberg 2020-12-22 09:09:46 +01:00
parent a0962a6417
commit c7f95fa0cc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -101,9 +101,10 @@ static int http2_perform_getsock(const struct connectdata *conn,
sock[0] = conn->sock[FIRSTSOCKET];
/* in a HTTP/2 connection we can basically always get a frame so we should
always be ready for one */
bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
if(!(k->keepon & KEEP_RECV_PAUSE))
/* Unless paused - in a HTTP/2 connection we can basically always get a
frame so we should always be ready for one */
bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
/* we're still uploading or the HTTP/2 layer wants to send data */
if(((k->keepon & (KEEP_SEND|KEEP_SEND_PAUSE)) == KEEP_SEND) ||