From 559704460438d8e79438d9db279d7f1721f5e3b5 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 29 Mar 2025 20:11:31 -0500 Subject: [PATCH] don't log InterruptedException during threadPool shutdown --- .../core/util/threading/RateLimitedThreadPoolExecutor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/util/threading/RateLimitedThreadPoolExecutor.java b/core/src/main/java/com/seibel/distanthorizons/core/util/threading/RateLimitedThreadPoolExecutor.java index d6cbcc73a..0d94b9384 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/util/threading/RateLimitedThreadPoolExecutor.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/util/threading/RateLimitedThreadPoolExecutor.java @@ -78,9 +78,11 @@ public class RateLimitedThreadPoolExecutor extends ThreadPoolExecutor long runTime = System.nanoTime() - this.runStartTime.get(); Thread.sleep(TimeUnit.NANOSECONDS.toMillis((long) (runTime / this.runTimeRatioConfig.get() - runTime))); } - catch (InterruptedException e) + catch (InterruptedException ignore) { - throw new RuntimeException(e); + // if this thread is interrupted that means the + // thread pool is being shut down, + // we don't need to log that. } }