mirror of
https://github.com/moparisthebest/curl
synced 2025-03-08 13:19:39 -05:00
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
This commit is contained in:
parent
5cd0b6f1f3
commit
c1b6a384f9
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user