mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Merge pull request #11739 from SimpleTease/ipv6
netplay: attempt ipv4 when ipv6 failure
This commit is contained in:
commit
08b9c40728
@ -134,6 +134,7 @@ static bool init_tcp_socket(netplay_t *netplay, void *direct_host,
|
||||
if (getaddrinfo_retro(server, port_buf, &hints, &res) != 0)
|
||||
{
|
||||
#ifdef HAVE_INET6
|
||||
try_wildcard:
|
||||
if (!server)
|
||||
{
|
||||
/* Didn't work with IPv6, try wildcard */
|
||||
@ -213,7 +214,13 @@ static bool init_tcp_socket(netplay_t *netplay, void *direct_host,
|
||||
freeaddrinfo_retro(res);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
#ifdef HAVE_INET6
|
||||
if (!direct_host && (hints.ai_family == AF_INET6))
|
||||
goto try_wildcard;
|
||||
#endif
|
||||
RARCH_ERR("Failed to set up netplay sockets.\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user