diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-08-26 16:00:05 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-26 22:44:59 +0200 |
commit | c1b6a384f9c8a91197c20adb49d43f30dc0e917d (patch) | |
tree | 919b82ec1f9387052af02b0c9e55e1ceeff98ddb | |
parent | 5cd0b6f1f31732fac1c70fb0452e44862594369c (diff) | |
download | curl-c1b6a384f9c8a91197c20adb49d43f30dc0e917d.tar.gz |
http2: when marked for closure and wanted to close == OK
It could otherwise return an error even when closed correctly if GOAWAY
had been received previously.
Reported-by: Tom van der Woerdt
Fixes #4267
Closes #4268
-rw-r--r-- | lib/http2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c index 930e85165..31d2d698a 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1559,6 +1559,11 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, if(should_close_session(httpc)) { H2BUGF(infof(data, "http2_recv: nothing to do in this session\n")); + if(conn->bits.close) { + /* already marked for closure, return OK and we're done */ + *err = CURLE_OK; + return 0; + } *err = CURLE_HTTP2; return -1; } |