From 28c7967a226a50a8204bed18961abaf64dd92cfc Mon Sep 17 00:00:00 2001 From: Martin Graversen Date: Fri, 31 Jan 2020 23:52:09 +0100 Subject: [PATCH] :bug: ConnectTask restore interrupt flag --- .../java/io/graversen/minecraft/rcon/service/ConnectTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/graversen/minecraft/rcon/service/ConnectTask.java b/src/main/java/io/graversen/minecraft/rcon/service/ConnectTask.java index cd08a62..0d2e8c4 100644 --- a/src/main/java/io/graversen/minecraft/rcon/service/ConnectTask.java +++ b/src/main/java/io/graversen/minecraft/rcon/service/ConnectTask.java @@ -19,7 +19,7 @@ class ConnectTask implements Callable { public MinecraftClient call() throws Exception { int currentAttempt = 1; - while (currentAttempt <= connectOptions.getMaxRetries()) { + while (currentAttempt <= connectOptions.getMaxRetries() && !Thread.currentThread().isInterrupted()) { Logger.debug("Connection attempt {}", currentAttempt); currentAttempt++;