[FIX] Доступ к NettyServerSocketHandler на postInit...

This commit is contained in:
zaxar163 2019-09-28 19:48:39 +03:00
parent f89fabaf11
commit 6af7283b60

View file

@ -405,6 +405,10 @@ public LaunchServer(LaunchServerDirectories directories, LaunchServerEnv env, La
Files.createDirectory(profilesDir); Files.createDirectory(profilesDir);
syncProfilesDir(); syncProfilesDir();
if (config.netty != null)
nettyServerSocketHandler = new NettyServerSocketHandler(this);
else
nettyServerSocketHandler = null;
// post init modules // post init modules
modulesManager.invokeEvent(new LaunchServerPostInitPhase(this)); modulesManager.invokeEvent(new LaunchServerPostInitPhase(this));
if (config.components != null) { if (config.components != null) {
@ -415,11 +419,6 @@ public LaunchServer(LaunchServerDirectories directories, LaunchServerEnv env, La
}); });
LogHelper.debug("PostInit components successful"); LogHelper.debug("PostInit components successful");
} }
// start updater
if (config.netty != null)
nettyServerSocketHandler = new NettyServerSocketHandler(this);
else
nettyServerSocketHandler = null;
} }
private LauncherBinary binary() { private LauncherBinary binary() {