]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: call the handle-closed function correctly on closed stream
authorDaniel Stenberg <daniel@haxx.se>
Mon, 19 Apr 2021 11:13:47 +0000 (13:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Apr 2021 06:20:24 +0000 (08:20 +0200)
This was this one condition where the stream could be closed due to an
error and the function would still wrongly just return 0 for it.

Reported-by: Gergely Nagy
Fixes #6862
Closes #6910

lib/http2.c

index ce9a0d393c59345c39b31047f959034d708549b0..8ceea3681b132dad4b4a053f4b4f551d4587a6f6 100644 (file)
@@ -1609,6 +1609,10 @@ static ssize_t http2_recv(struct Curl_easy *data, int sockindex,
     return -1;
   }
 
+  if(stream->closed)
+    /* closed overrides paused */
+    return http2_handle_stream_close(conn, data, stream, err);
+
   /* Nullify here because we call nghttp2_session_send() and they
      might refer to the old buffer. */
   stream->upload_mem = NULL;