From e6d86668621e8651f56471637da8b43147fbb297 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 17 Jan 2019 15:58:13 +0100 Subject: [PATCH] Fixed number of worker threads for endpoint --- src/dorkbox/network/connection/Shutdownable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dorkbox/network/connection/Shutdownable.java b/src/dorkbox/network/connection/Shutdownable.java index b9f715cd..4c86a7d7 100644 --- a/src/dorkbox/network/connection/Shutdownable.java +++ b/src/dorkbox/network/connection/Shutdownable.java @@ -75,7 +75,7 @@ class Shutdownable { * The number of threads used for the worker threads. */ @Property - public static int WORKER_THREAD_POOL_SIZE = Math.min(Runtime.getRuntime().availableProcessors() / 2, 1); + public static int WORKER_THREAD_POOL_SIZE = Math.max(Runtime.getRuntime().availableProcessors() / 2, 1); /** * The amount of time in milli-seconds to wait for this endpoint to close all {@link Channel}s and shutdown gracefully.