summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-22 09:09:46 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-22 09:09:46 +0100
commitf2995e682f115af22e237bc734c82b5fce59c475 (patch)
treedf3e1750cb17323e63b10b575cd78fd177e5e95e
parenta0962a6417f17f27fb197ae237cc65811627d7c5 (diff)
downloadcurl-bagder/h2-pause.tar.gz
h2: do not wait for RECV on paused transfersbagder/h2-pause
... as the socket might be readable all the time when paused and thus causing a busy-loop. Reported-by: Harry Sintonen Fixes #6356
-rw-r--r--lib/http2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/http2.c b/lib/http2.c
index b138fb4b0..7a337a7f3 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -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) ||