summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-12-16 10:53:29 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2014-12-16 10:53:29 +0000
commit20c65caae7eded1bf14f0e4c42d51e7c369b2ce5 (patch)
tree19474e9135930ce5c2f802468889c29a67580357
parent7bc218d1e2abe2d9c99eb0bac639c0cf50c949e3 (diff)
downloadcraftbukkit-20c65caae7eded1bf14f0e4c42d51e7c369b2ce5.tar
craftbukkit-20c65caae7eded1bf14f0e4c42d51e7c369b2ce5.tar.gz
craftbukkit-20c65caae7eded1bf14f0e4c42d51e7c369b2ce5.tar.lz
craftbukkit-20c65caae7eded1bf14f0e4c42d51e7c369b2ce5.tar.xz
craftbukkit-20c65caae7eded1bf14f0e4c42d51e7c369b2ce5.zip
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
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java
index 81bb0d15..193c3621 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java
@@ -263,7 +263,7 @@ public final class AsynchronousExecutor<P, T, C, E extends Throwable> {
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);