]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2_connisdead: handle trailing GOAWAY better
authorShikha Sharma <shikha.sharma@broadforward.com>
Fri, 4 Jun 2021 11:28:16 +0000 (13:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 5 Jun 2021 21:45:31 +0000 (23:45 +0200)
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

index f478bfe1cb2713111ccda30fa9c351ef0e1c12f3..2424eaf7f5a39f42d078e0bb14674d9dd25c4c21 100644 (file)
@@ -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 */