Fixed the bug which cause the application crashed when use TCP connect to an invalid address(such as 192.168.1.255).

This commit is contained in:
PP 2015-09-17 16:59:25 +08:00
parent 0f51190c27
commit 5dc8b51ceb

View File

@ -355,7 +355,8 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
&& err != WSAENETDOWN
&& err != WSAEACCES
&& err != WSAEINVAL
&& err != WSAEADDRINUSE)
&& err != WSAEADDRINUSE
&& err != WSAEADDRNOTAVAIL)
{
wsa_assert_no (err);
}
@ -375,7 +376,8 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
errno == EHOSTUNREACH ||
errno == ENETUNREACH ||
errno == ENETDOWN ||
errno == EINVAL);
errno == EINVAL ||
errno == EADDRNOTAVAIL);
return retired_fd;
}
#endif