summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-10-23 02:47:20 +0800
committerKeuin <[email protected]>2023-10-23 02:47:20 +0800
commit8a3f624d7a6f4b4c58b8204de7459b5fdeb5fce1 (patch)
treeeb315e893eb20cc7c1b192e08c2da22a80c68500
parent311778a284d1eba2891d4477af534f3e1219c2b1 (diff)
bugfix: writer thread does not stop on server shutdown
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/com/keuin/blame/SubmitWorker.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/gradle.properties b/gradle.properties
index 54856a8..165fd17 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,7 +6,7 @@ minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
loader_version=0.14.23
# Mod Properties
-mod_version=2.0.1
+mod_version=2.0.2
maven_group=com.keuin.blame
archives_base_name=blame-fabric
# Dependencies
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 -> {