diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java index 75a1a63ab6..f3da84a920 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java @@ -100,6 +100,9 @@ class CraftAsyncTask extends CraftTask { synchronized (workers) { // Synchronizing here prevents race condition for a completing task setPeriod(-2l); + if (workers.isEmpty()) { + runners.remove(getTaskId()); + } } return true; }