]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Gisle Vanem's fix for better info messages when failing to connect using
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Dec 2004 22:45:45 +0000 (22:45 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Dec 2004 22:45:45 +0000 (22:45 +0000)
the multi interface

lib/connect.c

index e982ddfafaea4aee325f92e6dfd83203f69a38aa..141d9593f66575f7ab330675d732a2028362757f 100644 (file)
@@ -523,10 +523,18 @@ CURLcode Curl_is_connected(struct connectdata *conn,
     }
   }
   else if(WAITCONN_TIMEOUT != rc) {
+    int error = 0;
+
     /* nope, not connected  */
+    if (WAITCONN_FDSET_ERROR == rc) {
+      verifyconnect(sockfd, &error);
+      infof(data, "%s\n",Curl_strerror(conn,error));
+    }
+    else
     infof(data, "Connection failed\n");
+
     if(trynextip(conn, sockindex, connected)) {
-      int error = Curl_ourerrno();
+      error = Curl_ourerrno();
       failf(data, "Failed connect to %s:%d; %s",
             conn->host.name, conn->port, Curl_strerror(conn,error));
       code = CURLE_COULDNT_CONNECT;