sws.c also check for EAGAIN in connect_to()

This commit is contained in:
Viktor Szakats 2026-06-12 17:11:44 +02:00
parent 30b27371c5
commit 7b1458cb12
No known key found for this signature in database

View file

@ -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) {