From e01a11b1d7549744773afbfa12be66b8305c8afb Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sat, 17 Aug 2024 15:36:04 +0200 Subject: [PATCH] Don't bother waiting for thread to terminate in TrafficHandler --- .../verkeersdrukte/traffic/TrafficHandler.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java b/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java index 096f161..1a70832 100644 --- a/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java +++ b/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java @@ -72,14 +72,7 @@ private void schedule(Runnable action, Duration interval) { @Override public void stop() { - try { - executor.shutdownNow(); - if (!executor.awaitTermination(5, TimeUnit.SECONDS)) { - LOG.warn("Executor did not terminate"); - } - } catch (InterruptedException e) { - LOG.warn("Error stopping executor", e); - } + executor.shutdownNow(); } private void downloadTrafficSpeed() {