From 71795d4e7e72166756d72b0133126313a5a1c552 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Sat, 18 Jun 2011 19:54:05 +0100 Subject: [PATCH] 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. --- src/anet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anet.c b/src/anet.c index 1996a487..f86c5249 100644 --- a/src/anet.c +++ b/src/anet.c @@ -225,7 +225,7 @@ static int anetTcpGenericConnect(char *err, char *addr, int port, int flags) snprintf(_port,6,"%d",port); memset(&hints,0,sizeof(hints)); - hints.ai_family = AF_INET; + hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; if ((rv = getaddrinfo(addr,_port,&hints,&servinfo)) != 0) { -- GitLab