Delay event loop initialization until after system properties are set. Closes #943

This commit is contained in:
md_5 2014-03-29 15:21:04 +11:00
parent 61e3d27ae9
commit f7a5748464

View File

@ -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 );