mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Martin C. Martin's fix to produce an error message in case of failure
in the Curl_is_connected() function.
This commit is contained in:
parent
83a463891d
commit
652683fc04
@ -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;
|
||||
}
|
||||
else if(1 != rc)
|
||||
failf(data, "Connection failed, socket error: %d", err);
|
||||
return CURLE_COULDNT_CONNECT;
|
||||
|
||||
}
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user