aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-02-14 09:11:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-02-14 09:11:51 +0000
commitc3dfe50aafb5f1687889da114d811f823791ebd7 (patch)
tree0d96cc6d9d83b5d6ac85eca7cfc36fa6f5819446 /lib
parent9659d862c79c06d256ed4b995194fb4d95f5e07a (diff)
Fix Curl_is_connected() even more to deal with waitconnect() return codes
even better (also based on input from Martin).
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 6e3df6627..98bdaca31 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -144,7 +144,11 @@ int Curl_nonblock(int socket, /* operate on this */
}
/*
- * Return 0 on fine connect, -1 on error and 1 on timeout.
+ * waitconnect() returns:
+ * 0 fine connect
+ * -1 select() error
+ * 1 select() timeout
+ * 2 select() returned with an error condition
*/
static
int waitconnect(int sockfd, /* socket */
@@ -409,7 +413,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
if(err)
return CURLE_COULDNT_CONNECT;
}
- else if(2 == rc)
+ else if(1 != rc)
return CURLE_COULDNT_CONNECT;
/*