mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
Fix Curl_is_connected() even more to deal with waitconnect() return codes
even better (also based on input from Martin).
This commit is contained in:
parent
9659d862c7
commit
c3dfe50aaf
@ -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
|
static
|
||||||
int waitconnect(int sockfd, /* socket */
|
int waitconnect(int sockfd, /* socket */
|
||||||
@ -409,7 +413,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
|
|||||||
if(err)
|
if(err)
|
||||||
return CURLE_COULDNT_CONNECT;
|
return CURLE_COULDNT_CONNECT;
|
||||||
}
|
}
|
||||||
else if(2 == rc)
|
else if(1 != rc)
|
||||||
return CURLE_COULDNT_CONNECT;
|
return CURLE_COULDNT_CONNECT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user