[FEATURE] Конфигурирование netty при автосоздании конфига

This commit is contained in:
Gravit 2019-02-20 17:35:04 +07:00
parent 709efdd04e
commit dd27978e12
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -569,6 +569,11 @@ private void generateConfigIfNotExists() throws IOException {
newConfig.binaryName = "Launcher";
newConfig.whitelistRejectString = "Вас нет в белом списке";
newConfig.netty = new NettyConfig();
newConfig.netty.address = "ws://localhost:9274";
newConfig.netty.clientEnabled = false;
newConfig.netty.port = 9274;
newConfig.threadCoreCount = 0; // on your own
newConfig.threadCount = JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors();