Fix first execution of async delayed/repeating tasks being sync (#12166)

This commit is contained in:
Warrior
2025-02-25 21:45:33 +01:00
committed by GitHub
parent 1d9b399427
commit 5f2ee83ed4

View File

@@ -181,7 +181,7 @@ public final class FoliaAsyncScheduler implements AsyncScheduler {
private void setDelay(final ScheduledFuture<?> delay) {
this.delay = delay;
this.state = STATE_SCHEDULED_EXECUTOR;
this.state = delay == null ? STATE_SCHEDULED_EXECUTOR : STATE_ON_TIMER;
}
@Override