From a0709f9951324e5278b4cc7661e8be2f06bdf890 Mon Sep 17 00:00:00 2001 From: Shikha Sharma Date: Fri, 4 Jun 2021 13:28:16 +0200 Subject: [PATCH] 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 --- lib/http2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/http2.c b/lib/http2.c index f478bfe1c..2424eaf7f 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 */