From f7a5748464c52ef1cd8e937c26f9a1145cadb946 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 29 Mar 2014 15:21:04 +1100 Subject: [PATCH] Delay event loop initialization until after system properties are set. Closes #943 --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index 8049cbfc..3f277ee7 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -86,7 +86,7 @@ public class BungeeCord extends ProxyServer * Localization bundle. */ public ResourceBundle bundle; - public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); + public MultithreadEventLoopGroup eventLoops; /** * locations.yml save thread. */ @@ -190,6 +190,8 @@ public class BungeeCord extends ProxyServer System.setProperty( "io.netty.selectorAutoRebuildThreshold", "0" ); // Seems to cause Bungee to stop accepting connections ResourceLeakDetector.setEnabled( false ); // Eats performance + eventLoops = new NioEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); + File moduleDirectory = new File( "modules" ); moduleManager.load( this, moduleDirectory ); pluginManager.detectPlugins( moduleDirectory );