Commit cd39b00e authored by Jake Cobb's avatar Jake Cobb

Consistency of Windows TCP tuning assertions

Treat ECONNRESET, ENETRESET and EINTR as non-fatal
failures in TCP Tuning on Windows as they are in the
Unixes.  Also adds ENETRESET to the Unix list that was missing.
parent d66c2508
...@@ -321,11 +321,14 @@ void zmq::tcp_assert_tuning_error(zmq::fd_t s_, int rc_) ...@@ -321,11 +321,14 @@ void zmq::tcp_assert_tuning_error(zmq::fd_t s_, int rc_)
zmq_assert (rc == 0); zmq_assert (rc == 0);
if (err != 0) { if (err != 0) {
wsa_assert (err == WSAECONNREFUSED wsa_assert (err == WSAECONNREFUSED
|| err == WSAETIMEDOUT || err == WSAECONNRESET
|| err == WSAECONNABORTED || err == WSAECONNABORTED
|| err == WSAEINTR
|| err == WSAETIMEDOUT
|| err == WSAEHOSTUNREACH || err == WSAEHOSTUNREACH
|| err == WSAENETUNREACH || err == WSAENETUNREACH
|| err == WSAENETDOWN || err == WSAENETDOWN
|| err == WSAENETRESET
|| err == WSAEACCES || err == WSAEACCES
|| err == WSAEINVAL || err == WSAEINVAL
|| err == WSAEADDRINUSE); || err == WSAEADDRINUSE);
...@@ -346,6 +349,7 @@ void zmq::tcp_assert_tuning_error(zmq::fd_t s_, int rc_) ...@@ -346,6 +349,7 @@ void zmq::tcp_assert_tuning_error(zmq::fd_t s_, int rc_)
errno == EHOSTUNREACH || errno == EHOSTUNREACH ||
errno == ENETUNREACH || errno == ENETUNREACH ||
errno == ENETDOWN || errno == ENETDOWN ||
errno == ENETRESET ||
errno == EINVAL); errno == EINVAL);
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment