Check for EAGAIN as well to confirm connect(2) has started
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7299 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
73a29daefd
commit
36f536fcdb
|
@ -48,6 +48,7 @@ static const int SOCKET_ERROR = -1;
|
|||
#elif defined(WZ_OS_WIN)
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
# define EAGAIN WSAEWOULDBLOCK
|
||||
# define EINPROGRESS WSAEINPROGRESS
|
||||
# define EISCONN WSAEISCONN
|
||||
# define ETIMEDOUT WSAETIMEDOUT
|
||||
|
@ -679,6 +680,7 @@ static Socket* SocketOpen(const struct addrinfo* addr, unsigned int timeout)
|
|||
#endif
|
||||
|
||||
if ((getSockErr() != EINPROGRESS
|
||||
&& getSockErr() != EAGAIN
|
||||
&& getSockErr() != EWOULDBLOCK)
|
||||
#if defined(WZ_OS_UNIX)
|
||||
|| conn->fd >= FD_SETSIZE
|
||||
|
|
Loading…
Reference in New Issue