Don't enforce IPv4 for clients connecting to IPv6-only servers (#4563)

This commit is contained in:
Ben Staddon 2017-12-17 01:39:27 +00:00 committed by LexManos
parent 98997061f0
commit 41766c9830

View file

@ -39,7 +39,15 @@
{
NetworkManager.this.func_150723_a(enumconnectionstate);
}
@@ -454,6 +459,11 @@
@@ -308,6 +313,7 @@
@SideOnly(Side.CLIENT)
public static NetworkManager func_181124_a(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_)
{
+ if (p_181124_0_ instanceof java.net.Inet6Address) System.setProperty("java.net.preferIPv4Stack", "false");
final NetworkManager networkmanager = new NetworkManager(EnumPacketDirection.CLIENTBOUND);
Class <? extends SocketChannel > oclass;
LazyLoadBase <? extends EventLoopGroup > lazyloadbase;
@@ -454,6 +460,11 @@
}
}