]> granicus.if.org Git - curl/commitdiff
connection_check: set ->data to the transfer doing the check
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Feb 2019 06:56:00 +0000 (07:56 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Feb 2019 09:34:34 +0000 (10:34 +0100)
The http2 code for connection checking needs a transfer to use. Make
sure a working one is set before handler->connection_check() is called.

Reported-by: jnbr on github
Fixes #3541
Closes #3547

lib/url.c

index bdb4729993bd5c37dfa9dc2a919a51f3ade46069..bc47685db38c043232e080badbc3ee64b80f482b 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -964,6 +964,7 @@ static bool extract_if_dead(struct connectdata *conn,
       /* The protocol has a special method for checking the state of the
          connection. Use it to check if the connection is dead. */
       unsigned int state;
+      conn->data = data; /* use this transfer for now */
       state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
       dead = (state & CONNRESULT_DEAD);
     }