mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix init tasks executing in wrong order
This commit is contained in:
parent
1474e5a438
commit
d586a51bbc
@ -77,12 +77,12 @@ namespace MCGalaxy.Tasks {
|
||||
|
||||
|
||||
SchedulerTask GetNextTask() {
|
||||
DateTime minTime = DateTime.UtcNow;
|
||||
DateTime minTime = DateTime.UtcNow.AddMilliseconds(1);
|
||||
SchedulerTask minTask = null;
|
||||
|
||||
lock (taskLock) {
|
||||
foreach (SchedulerTask task in tasks) {
|
||||
if (task.NextRun > minTime) continue;
|
||||
if (task.NextRun >= minTime) continue;
|
||||
minTime = task.NextRun; minTask = task;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user