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-861f7616d084
master
Giel van Schijndel 2009-05-03 15:38:16 +00:00 committed by Git SVN Gateway
parent 73a29daefd
commit 36f536fcdb
1 changed files with 2 additions and 0 deletions

View File

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