summaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-10-18 17:27:21 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-10-18 23:23:48 +0200
commit95a4cfd88820452a5e5da5b64e46b22bceac963f (patch)
tree290e85238291228bd9250be30345e36913a1c87f /lib/http2.c
parent59041f052a5209a3aebb146c01b689424f9f7b04 (diff)
downloadcurl-95a4cfd88820452a5e5da5b64e46b22bceac963f.tar.gz
http2_recv: a closed stream trumps pause state
... and thus should return 0, not EAGAIN. Reported-by: Tom van der Woerdt Fixes #4496 Closes #4505
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index c0f29f83e..bae938811 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1663,6 +1663,9 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
socket is not read. But it seems that usually streams are
notified with its drain property, and socket is read again
quickly. */
+ if(stream->closed)
+ /* closed overrides paused */
+ return 0;
H2BUGF(infof(data, "stream %x is paused, pause id: %x\n",
stream->stream_id, httpc->pause_stream_id));
*err = CURLE_AGAIN;