diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-07-29 11:15:33 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-07-29 22:16:27 +0200 |
commit | fc6045f5d1367b3bd60bb00aa9bed5164f000aee (patch) | |
tree | 1ec1b07c40489159d795e2fbe2f746212341fb5e /lib/http2.c | |
parent | a2ab576768442f669040837c7f0667e672cf7d48 (diff) | |
download | curl-fc6045f5d1367b3bd60bb00aa9bed5164f000aee.tar.gz |
http2_recv: trigger another read when the last data is returned
... so that end-of-stream is detected properly.
Reported-by: Tom van der Woerdt
Fixes #4043
Closes #4160
Diffstat (limited to 'lib/http2.c')
-rw-r--r-- | lib/http2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c index eb55e62d1..711263524 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -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; } |