Curl_connecthost: friendlier "couldn't connect" message

This commit is contained in:
Lars Buitinck 2012-10-31 16:58:53 +01:00 committed by Daniel Stenberg
parent cda6d891ab
commit e1fa945e7e
1 changed files with 3 additions and 1 deletions

View File

@ -1101,7 +1101,9 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
if(sockfd == CURL_SOCKET_BAD) {
/* no good connect was made */
failf(data, "couldn't connect to host");
failf(data, "couldn't connect to %s at %s:%d",
conn->bits.proxy?"proxy":"host",
conn->bits.proxy?conn->proxy.name:conn->host.name, conn->port);
return CURLE_COULDNT_CONNECT;
}