Merge pull request #122 from pijyoi/master

fix: sockets are not signed int on Windows
This commit is contained in:
Luca Boccassi 2016-06-04 10:28:12 +01:00
commit 4d613cb890
2 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ int zmq::tcp_connecter_t::open ()
s = open_socket (tcp_addr->family (), SOCK_STREAM, IPPROTO_TCP);
// IPv6 address family not supported, try automatic downgrade to IPv4.
if (s == -1 && tcp_addr->family () == AF_INET6
if (s == zmq::retired_fd && tcp_addr->family () == AF_INET6
&& errno == EAFNOSUPPORT
&& options.ipv6) {
rc = addr->resolved.tcp_addr->resolve (

View File

@ -169,7 +169,7 @@ int zmq::tcp_listener_t::set_address (const char *addr_)
s = open_socket (address.family (), SOCK_STREAM, IPPROTO_TCP);
// IPv6 address family not supported, try automatic downgrade to IPv4.
if (s == -1 && address.family () == AF_INET6
if (s == zmq::retired_fd && address.family () == AF_INET6
&& errno == EAFNOSUPPORT
&& options.ipv6) {
rc = address.resolve (addr_, true, false);