Actually allow connecting to "localhost"

Because IPv6 doesn't seem to work anyway.
This commit is contained in:
James R 2019-03-20 20:05:45 -07:00
parent f139ffd1dc
commit ed0f8fd967
1 changed files with 6 additions and 2 deletions

View File

@ -1340,8 +1340,12 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
while (runp != NULL)
{
// find ip of the server
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
runp = NULL;
if (sendto(mysockets[0], NULL, 0, 0, runp->ai_addr, runp->ai_addrlen) == 0)
{
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
break;
}
runp = runp->ai_next;
}
I_freeaddrinfo(ai);
return newnode;