13
0
geforkt von Mirrors/Paper

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 <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2014-12-16 10:53:29 +00:00
Ursprung 06b6d694ae
Commit 5820e42b8d

Datei anzeigen

@ -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);