mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Don't force IPv4 network stack if IPv6 is specifically requested (#4547)
This commit is contained in:
1 parent
44d0e9f05d
commit
b215d90589
2 files changed
+13
-2
No files matched your search
@@ -25,7 +25,15 @@
|
||||
}
|
||||
};
|
||||
private final MinecraftServer field_151273_d;
|
||||
@@ -110,7 +110,7 @@
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
public void func_151265_a(InetAddress p_151265_1_, int p_151265_2_) throws IOException
|
||||
{
|
||||
+ if (p_151265_1_ instanceof java.net.Inet6Address) System.setProperty("java.net.preferIPv4Stack", "false");
|
||||
synchronized (this.field_151274_e)
|
||||
{
|
||||
Class <? extends ServerSocketChannel > oclass;
|
||||
@@ -110,7 +111,7 @@
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,10 @@ public class FMLTweaker implements ITweaker {
|
||||
|
||||
public FMLTweaker()
|
||||
{
|
||||
System.setProperty("java.net.preferIPv4Stack", "true"); //Lets do this as early as possible. Vanilla does it in Main.main
|
||||
if (System.getProperty("java.net.preferIPv4Stack") == null)
|
||||
{
|
||||
System.setProperty("java.net.preferIPv4Stack", "true");
|
||||
}
|
||||
try
|
||||
{
|
||||
System.setSecurityManager(new FMLSecurityManager());
|
||||
|
||||
Reference in new issue
Block a user