summaryrefslogtreecommitdiff
path: root/src/tcp_connecter.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-05-08 09:03:49 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-05-08 09:03:49 +0200
commit49387874efe790713f4a090e03a97212f4889163 (patch)
tree8f95a07b3529892e6512061b35f8d963927c1c68 /src/tcp_connecter.cpp
parentda1ef4d2685c02e8320847d49a38726b2b6d52f0 (diff)
Async connect doesn't fail on EWSANETDOWN
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/tcp_connecter.cpp')
-rw-r--r--src/tcp_connecter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp
index 01463c0..94891b5 100644
--- a/src/tcp_connecter.cpp
+++ b/src/tcp_connecter.cpp
@@ -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.