From 95a4cfd88820452a5e5da5b64e46b22bceac963f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 18 Oct 2019 17:27:21 +0200 Subject: 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 --- lib/http2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/http2.c') 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; -- cgit v1.2.3