mirror of https://github.com/eclipse/paho.mqtt.c
Merge pull request #1578 from cwardcode/ipv6-support-getaddrinfo
Update getaddrinfo options to support IPv6 hostname resolution
This commit is contained in:
commit
87c1c56f16
|
|
@ -1146,7 +1146,7 @@ int Socket_new(const char* addr, size_t addr_len, int port, SOCKET* sock)
|
|||
sa_family_t family = AF_INET;
|
||||
#endif
|
||||
struct addrinfo *result = NULL;
|
||||
struct addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
|
||||
struct addrinfo hints = {AI_ADDRCONFIG, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
|
||||
|
||||
FUNC_ENTRY;
|
||||
*sock = SOCKET_ERROR;
|
||||
|
|
|
|||
Loading…
Reference in New Issue