summaryrefslogtreecommitdiff
path: root/src/tcp_connecter.cpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2011-05-13 12:43:09 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:59 +0100
commitad3e013f74d309b86e8f087932203e5787fe2d2d (patch)
treea872da7e7338a0bb27b92ef1f198689873b86978 /src/tcp_connecter.cpp
parentf34d1599a651dd0b8feba2397f87629733988384 (diff)
parentb593ea30833ad5dcacb9076c988aec31b0cf26ec (diff)
Imported Debian patch 2.1.7-1debian/2.1.7-1
Diffstat (limited to 'src/tcp_connecter.cpp')
-rw-r--r--src/tcp_connecter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp
index 0c1581d..71b362b 100644
--- a/src/tcp_connecter.cpp
+++ b/src/tcp_connecter.cpp
@@ -118,11 +118,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);
+ 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.