From 8a3f624d7a6f4b4c58b8204de7459b5fdeb5fce1 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 23 Oct 2023 02:47:20 +0800 Subject: bugfix: writer thread does not stop on server shutdown --- src/main/java/com/keuin/blame/SubmitWorker.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main') diff --git a/src/main/java/com/keuin/blame/SubmitWorker.java b/src/main/java/com/keuin/blame/SubmitWorker.java index a704c7b..103fc9c 100644 --- a/src/main/java/com/keuin/blame/SubmitWorker.java +++ b/src/main/java/com/keuin/blame/SubmitWorker.java @@ -150,6 +150,9 @@ public class SubmitWorker { var result = work(client, req, batchBuffer, writeImmediately); switch (result) { case CONTINUE -> { + if (isStopped.get()) { + return; + } writeImmediately = false; } case RECONNECT -> { -- cgit v1.2.3