]> granicus.if.org Git - curl/commitdiff
http2_recv: trigger another read when the last data is returned
authorDaniel Stenberg <daniel@haxx.se>
Mon, 29 Jul 2019 09:15:33 +0000 (11:15 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Jul 2019 20:16:27 +0000 (22:16 +0200)
... so that end-of-stream is detected properly.

Reported-by: Tom van der Woerdt
Fixes #4043
Closes #4160

lib/http2.c

index eb55e62d1c8d9fa73791fdef0995f345a7914b6f..71126352490421bc18b1c03f3dfc854a93868081 100644 (file)
@@ -1755,6 +1755,9 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
     else if(!stream->closed) {
       drained_transfer(data, httpc);
     }
+    else
+      /* this stream is closed, trigger a another read ASAP to detect that */
+      Curl_expire(data, 0, EXPIRE_RUN_NOW);
 
     return retlen;
   }