From 5820e42b8d6eb0aa4d3c98f2b51b1548043ed5c3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 16 Dec 2014 10:53:29 +0000 Subject: [PATCH] SPIGOT-210: Remove the exception when dropping a non-existant task If the server crashes during chunk generation then the chunk would have never been added to the executor, this caused a second exception to be thrown when the server shutdown from the first exception By: Thinkofdeath --- .../java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java index 81bb0d15a1..193c3621c6 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java @@ -263,7 +263,7 @@ public final class AsynchronousExecutor { public boolean drop(P parameter, C callback) throws IllegalStateException { final Task task = tasks.get(parameter); if (task == null) { - throw new IllegalStateException("Unknown " + parameter); + return true; } if (!task.callbacks.remove(callback)) { throw new IllegalStateException("Unknown " + callback + " for " + parameter);