From c160298d9daf210edd123f7a22606aa91f832af4 Mon Sep 17 00:00:00 2001 From: Zaxar163 <35835496+Zaxar163@users.noreply.github.com> Date: Sun, 11 Nov 2018 09:00:18 +0300 Subject: [PATCH] Fix errors. --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 1cfc9c2f..ac995a57 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -114,9 +114,9 @@ private Config(BlockConfigEntry block, Path coredir, LaunchServer server) { port = VerifyHelper.verifyInt(block.getEntryValue("port", IntegerConfigEntry.class), VerifyHelper.range(0, 65535), "Illegal LaunchServer port"); threadCoreCount = block.hasEntry("threadCoreCacheSize") ? VerifyHelper.verifyInt(block.getEntryValue("threadCoreCacheSize", IntegerConfigEntry.class), - VerifyHelper.range(2, 100), "Illegal LaunchServer thread cache size") : 0; + VerifyHelper.range(0, 100), "Illegal LaunchServer inital thread pool cache size") : 0; int internalThreadCount = block.hasEntry("threadCacheSize") ? VerifyHelper.verifyInt(block.getEntryValue("threadCacheSize", IntegerConfigEntry.class), - VerifyHelper.range(2, 100), "Illegal LaunchServer thread cache size") : (JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors()); + VerifyHelper.range(2, 100), "Illegal LaunchServer thread pool cache size") : (JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors()); threadCount = threadCoreCount > internalThreadCount ? threadCoreCount : internalThreadCount; authRateLimit = VerifyHelper.verifyInt(block.getEntryValue("authRateLimit", IntegerConfigEntry.class), VerifyHelper.range(0, 1000000), "Illegal authRateLimit");