mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
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
This commit is contained in:
parent
7bc218d1e2
commit
20c65caae7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue