diff --git a/src/main/java/com/pivovarit/collectors/Dispatcher.java b/src/main/java/com/pivovarit/collectors/Dispatcher.java index 251eae72..5f213399 100644 --- a/src/main/java/com/pivovarit/collectors/Dispatcher.java +++ b/src/main/java/com/pivovarit/collectors/Dispatcher.java @@ -52,7 +52,7 @@ void start() { started = true; dispatcher.execute(() -> { try { - while (!Thread.currentThread().isInterrupted()) { + while (true) { Runnable task; if ((task = workingQueue.take()) != POISON_PILL) { limiter.acquire();