windows fix
This commit is contained in:
parent
b1e2c4ce72
commit
3cb2f6dcf7
@ -76,12 +76,17 @@ namespace ix
|
|||||||
// block us for too long
|
// block us for too long
|
||||||
SocketConnect::configure(fd);
|
SocketConnect::configure(fd);
|
||||||
|
|
||||||
if (::connect(fd, address->ai_addr, address->ai_addrlen) == -1
|
if (::connect(fd, address->ai_addr, address->ai_addrlen) == -1)
|
||||||
&& errno != EINPROGRESS)
|
|
||||||
{
|
{
|
||||||
closeSocket(fd);
|
#ifdef _WIN32
|
||||||
errMsg = strerror(errno);
|
if (Socket::getErrno() == EWOULDBLOCK) errno = EINPROGRESS;
|
||||||
return -1;
|
#endif
|
||||||
|
if (errno != EINPROGRESS)
|
||||||
|
{
|
||||||
|
closeSocket(fd);
|
||||||
|
errMsg = strerror(errno);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -21,9 +21,11 @@ include_directories(
|
|||||||
# Shared sources
|
# Shared sources
|
||||||
set (SOURCES
|
set (SOURCES
|
||||||
test_runner.cpp
|
test_runner.cpp
|
||||||
IXDNSLookupTest.cpp
|
|
||||||
IXTest.cpp
|
IXTest.cpp
|
||||||
msgpack11.cpp
|
msgpack11.cpp
|
||||||
|
|
||||||
|
IXDNSLookupTest.cpp
|
||||||
|
IXSocketTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Some unittest don't work on windows yet
|
# Some unittest don't work on windows yet
|
||||||
@ -31,7 +33,6 @@ if (NOT WIN32)
|
|||||||
list(APPEND SOURCES
|
list(APPEND SOURCES
|
||||||
IXWebSocketServerTest.cpp
|
IXWebSocketServerTest.cpp
|
||||||
cmd_websocket_chat.cpp
|
cmd_websocket_chat.cpp
|
||||||
IXSocketTest.cpp
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user