Change anetTcpGenericConnect to use AF_UNSPEC.
This allows anetTcpGenericConnect to try to connect to AF_INET6 addresses in addition to any resolved AF_INET addresses.
This commit is contained in:
parent
5d702e012e
commit
25f6d0eb6e
@ -225,7 +225,7 @@ static int anetTcpGenericConnect(char *err, char *addr, int port, int flags)
|
|||||||
|
|
||||||
snprintf(_port,6,"%d",port);
|
snprintf(_port,6,"%d",port);
|
||||||
memset(&hints,0,sizeof(hints));
|
memset(&hints,0,sizeof(hints));
|
||||||
hints.ai_family = AF_INET;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
|
||||||
if ((rv = getaddrinfo(addr,_port,&hints,&servinfo)) != 0) {
|
if ((rv = getaddrinfo(addr,_port,&hints,&servinfo)) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user