Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract_if_dead: use a known working transfer when checking connections #3464

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/url.c
Expand Up @@ -965,8 +965,9 @@ 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; /* temporary transfer for this connection to use */
state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
conn->data = NULL; /* clear transfer again */
dead = (state & CONNRESULT_DEAD);
}
else {
Expand Down Expand Up @@ -3773,7 +3774,6 @@ static CURLcode create_conn(struct Curl_easy *data,

/* Setup a "faked" transfer that'll do nothing */
if(!result) {
conn->data = data;
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */

result = Curl_conncache_add_conn(data->state.conn_cache, conn);
Expand Down