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
This commit is contained in:
Daniel Stenberg 2019-10-18 17:27:21 +02:00
parent 59041f052a
commit 95a4cfd888
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 3 additions and 0 deletions

View File

@ -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;