Fix TCP connection tests on Linux and BSD

This commit is contained in:
Cameron Gutman 2020-07-26 20:56:39 -07:00
parent 117a7c637f
commit 6351749039
2 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,7 @@ unsigned int LiTestClientConnectivity(const char* testServer, unsigned short ref
err = connect(sockets[i], current->ai_addr, current->ai_addrlen);
if (err < 0) {
err = (int)LastSocketError();
if (err != EWOULDBLOCK && err != EAGAIN) {
if (err != EWOULDBLOCK && err != EAGAIN && err != EINPROGRESS) {
Limelog("Failed to start async connect to TCP %u: %d\n", LiGetPortFromPortFlagIndex(i), err);
// Mask off this bit so we don't try to include it in pollSockets() below

View File

@ -12,6 +12,7 @@
#define SHUT_RDWR SD_BOTH
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EAGAIN WSAEWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS
#define EINTR WSAEINTR
#define ETIMEDOUT WSAETIMEDOUT