1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 05:55:04 -05:00

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
This commit is contained in:
Daniel Stenberg 2019-02-11 07:56:00 +01:00
parent 81a9fe4e92
commit 38d8e1bd4e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

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