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.
This commit is contained in:
Jake Cobb
2017-04-10 10:57:17 -04:00
parent d66c2508cf
commit cd39b00e19

View File

@@ -321,11 +321,14 @@ void zmq::tcp_assert_tuning_error(zmq::fd_t s_, int rc_)
zmq_assert (rc == 0);
if (err != 0) {
wsa_assert (err == WSAECONNREFUSED
|| err == WSAETIMEDOUT
|| err == WSAECONNRESET
|| err == WSAECONNABORTED
|| err == WSAEINTR
|| err == WSAETIMEDOUT
|| err == WSAEHOSTUNREACH
|| err == WSAENETUNREACH
|| err == WSAENETDOWN
|| err == WSAENETRESET
|| err == WSAEACCES
|| err == WSAEINVAL
|| err == WSAEADDRINUSE);
@@ -346,6 +349,7 @@ void zmq::tcp_assert_tuning_error(zmq::fd_t s_, int rc_)
errno == EHOSTUNREACH ||
errno == ENETUNREACH ||
errno == ENETDOWN ||
errno == ENETRESET ||
errno == EINVAL);
}
#endif