From ecad0a0d344e1941c4415591ec3dc1a2254e8268 Mon Sep 17 00:00:00 2001 From: Amos Ng Date: Fri, 12 Jun 2020 18:10:42 +0800 Subject: [PATCH] Replaced exponential calculation for ApacheClient threads Turns out Kotlin doesn't do powers easily :/ --- src/main/kotlin/mdnet/base/Application.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/mdnet/base/Application.kt b/src/main/kotlin/mdnet/base/Application.kt index 78459e5..5820604 100644 --- a/src/main/kotlin/mdnet/base/Application.kt +++ b/src/main/kotlin/mdnet/base/Application.kt @@ -39,7 +39,7 @@ import javax.crypto.CipherOutputStream import javax.crypto.spec.SecretKeySpec private val LOGGER = LoggerFactory.getLogger("Application") -private val THREADS_TO_ALLOCATE = 2**18 // Honestly, no reason to not just let 'er rip. Inactive connections will expire on their own :D +private val THREADS_TO_ALLOCATE = 262144 // 2**18 // Honestly, no reason to not just let 'er rip. Inactive connections will expire on their own :D fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSettings: ClientSettings, statistics: AtomicReference): Http4kServer { val executor = Executors.newCachedThreadPool()