mirror of
https://github.com/curl/curl.git
synced 2026-06-14 03:05:41 +03:00
sws.c also check for EAGAIN in connect_to()
This commit is contained in:
parent
30b27371c5
commit
7b1458cb12
1 changed files with 3 additions and 2 deletions
|
|
@ -1334,7 +1334,7 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port)
|
|||
|
||||
if(rc) {
|
||||
error = SOCKERRNO;
|
||||
if((error == SOCKEINPROGRESS) || (error == SOCKEWOULDBLOCK)) {
|
||||
if((error == SOCKEINPROGRESS) || SOCK_EWOULDBLOCK_EAGAIN(error)) {
|
||||
fd_set output;
|
||||
struct timeval timeout = { 0 };
|
||||
timeout.tv_sec = 1; /* 1000 ms */
|
||||
|
|
@ -1352,7 +1352,8 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port)
|
|||
error = SOCKERRNO;
|
||||
if((error == 0) || (SOCKEISCONN == error))
|
||||
goto success;
|
||||
else if((error != SOCKEINPROGRESS) && (error != SOCKEWOULDBLOCK))
|
||||
else if((error != SOCKEINPROGRESS) &&
|
||||
!SOCK_EWOULDBLOCK_EAGAIN(error))
|
||||
goto error;
|
||||
}
|
||||
else if(!rc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue