Skip to content
Snippets Groups Projects
Commit 652683fc authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Martin C. Martin's fix to produce an error message in case of failure

in the Curl_is_connected() function.
parent 83a46389
No related branches found
No related tags found
No related merge requests found
......@@ -410,12 +410,15 @@ CURLcode Curl_is_connected(struct connectdata *conn,
return CURLE_OK;
}
/* nope, not connected for real */
if(err)
return CURLE_COULDNT_CONNECT;
failf(data, "Connection failed, socket error: %d", err);
return CURLE_COULDNT_CONNECT;
}
else if(1 != rc)
else if(1 != rc) {
int error = ourerrno();
failf(data, "Failed connect to %s:%d, errno: %d",
conn->hostname, conn->port, error);
return CURLE_COULDNT_CONNECT;
}
/*
* If the connection phase is "done" here, we should attempt to connect
* to the "next address" in the Curl_hostaddr structure that we resolved
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment