mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 08:46:44 +01:00
Windows: if WSA error number is held, use directly.
It must be done this way, as WSAGetLastError returns 0 in these circumstances
This commit is contained in:
parent
660bf4311b
commit
993cb32e96
@ -303,15 +303,18 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
|
|||||||
#ifdef ZMQ_HAVE_WINDOWS
|
#ifdef ZMQ_HAVE_WINDOWS
|
||||||
zmq_assert (rc == 0);
|
zmq_assert (rc == 0);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
wsa_assert (err == WSAECONNREFUSED
|
if (err != WSAECONNREFUSED
|
||||||
|| err == WSAETIMEDOUT
|
&& err != WSAETIMEDOUT
|
||||||
|| err == WSAECONNABORTED
|
&& err != WSAECONNABORTED
|
||||||
|| err == WSAEHOSTUNREACH
|
&& err != WSAEHOSTUNREACH
|
||||||
|| err == WSAENETUNREACH
|
&& err != WSAENETUNREACH
|
||||||
|| err == WSAENETDOWN
|
&& err != WSAENETDOWN
|
||||||
|| err == WSAEACCES
|
&& err != WSAEACCES
|
||||||
|| err == WSAEINVAL
|
&& err != WSAEINVAL
|
||||||
|| err == WSAEADDRINUSE);
|
&& err != WSAEADDRINUSE)
|
||||||
|
{
|
||||||
|
wsa_assert_no (err);
|
||||||
|
}
|
||||||
return retired_fd;
|
return retired_fd;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user