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

Fix Curl_is_connected() even more to deal with waitconnect() return codes

even better (also based on input from Martin).
parent 9659d862
No related branches found
No related tags found
No related merge requests found
......@@ -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;
/*
......
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