Skip to content

Commit

Permalink
http2_recv: trigger another read when the last data is returned
Browse files Browse the repository at this point in the history
... so that end-of-stream is detected properly.

Reported-by: Tom van der Woerdt
Fixes curl#4043
Closes curl#4160
  • Loading branch information
bagder committed Jul 29, 2019
1 parent a2ab576 commit fc6045f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/http2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fc6045f

Please sign in to comment.