]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2_recv: a closed stream trumps pause state
authorDaniel Stenberg <daniel@haxx.se>
Fri, 18 Oct 2019 15:27:21 +0000 (17:27 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Oct 2019 21:23:48 +0000 (23:23 +0200)
... and thus should return 0, not EAGAIN.

Reported-by: Tom van der Woerdt
Fixes #4496
Closes #4505

lib/http2.c

index c0f29f83e8f0587da9ecdd4433a20f563dc6d547..bae9388118fdfb6c5e5b7de29c60d3b9be83f2e2 100644 (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;