From: Daniel Stenberg Date: Mon, 11 Feb 2019 06:56:00 +0000 (+0100) Subject: connection_check: set ->data to the transfer doing the check X-Git-Tag: curl-7_64_1~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38d8e1bd4ed1ae52930ae466ecbac78e888b142f;p=thirdparty%2Fcurl.git connection_check: set ->data to the transfer doing the check 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 --- diff --git a/lib/url.c b/lib/url.c index bdb4729993..bc47685db3 100644 --- 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); }