From 52d0e151df6f8376f97705a41d119d286306dd8a Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Fri, 5 Jul 2024 15:44:00 +0700 Subject: [PATCH] Return result at shutdownAndAwaitTermination Signed-off-by: HenrikJannsen --- common/src/main/java/bisq/common/util/Utilities.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/bisq/common/util/Utilities.java b/common/src/main/java/bisq/common/util/Utilities.java index 30e0e7a05f7..87125850fea 100644 --- a/common/src/main/java/bisq/common/util/Utilities.java +++ b/common/src/main/java/bisq/common/util/Utilities.java @@ -63,7 +63,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -144,9 +143,9 @@ private static ThreadPoolExecutor getThreadPoolExecutor(String name, return executor; } - public static void shutdownAndAwaitTermination(ExecutorService executor, long timeout, TimeUnit unit) { + public static boolean shutdownAndAwaitTermination(ExecutorService executor, long timeout, TimeUnit unit) { //noinspection UnstableApiUsage - MoreExecutors.shutdownAndAwaitTermination(executor, timeout, unit); + return MoreExecutors.shutdownAndAwaitTermination(executor, timeout, unit); } public static FutureCallback failureCallback(Consumer errorHandler) {