From: Shikha Sharma Date: Fri, 4 Jun 2021 11:28:16 +0000 (+0200) Subject: http2_connisdead: handle trailing GOAWAY better X-Git-Tag: curl-7_78_0~200 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0709f9951324e5278b4cc7661e8be2f06bdf890;p=thirdparty%2Fcurl.git http2_connisdead: handle trailing GOAWAY better When checking the connection the input processing returns error immediately, we now consider that a dead connnection. Bug: https://curl.se/mail/lib-2021-06/0001.html Closes #7192 --- diff --git a/lib/http2.c b/lib/http2.c index f478bfe1cb..2424eaf7f5 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -200,7 +200,9 @@ static bool http2_connisdead(struct Curl_easy *data, struct connectdata *conn) (int)nread); httpc->nread_inbuf = 0; httpc->inbuflen = nread; - (void)h2_process_pending_input(data, httpc, &result); + if(h2_process_pending_input(data, httpc, &result) < 0) + /* immediate error, considered dead */ + dead = TRUE; } else /* the read failed so let's say this is dead anyway */