Async connect doesn't fail on EWSANETDOWN

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Martin Sustrik
2011-05-08 09:03:49 +02:00
parent da1ef4d268
commit 49387874ef
3 changed files with 76 additions and 58 deletions

View File

@@ -116,12 +116,12 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
// Assert that the error was caused by the networking problems
// rather than 0MQ bug.
errno = err;
errno_assert (errno == WSAECONNREFUSED || errno == WSAETIMEDOUT ||
errno == WSAECONNABORTED || errno == WSAEHOSTUNREACH ||
errno == WSAENETUNREACH);
if (err == WSAECONNREFUSED || err == WSAETIMEDOUT ||
err == WSAECONNABORTED || err == WSAEHOSTUNREACH ||
err == WSAENETUNREACH || err == WSAENETDOWN)
return retired_fd;
return retired_fd;
wsa_assert_no (err);
}
// Return the newly connected socket.