mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
TaskScheduler: do not push cancelled repeating tasks back onto the queue
This commit is contained in:
parent
8d1a1628de
commit
177b963d8e
@ -177,7 +177,7 @@ class TaskScheduler{
|
||||
continue;
|
||||
}
|
||||
$task->run($this->currentTick);
|
||||
if($task->isRepeating()){
|
||||
if(!$task->isCancelled() && $task->isRepeating()){
|
||||
$task->setNextRun($this->currentTick + $task->getPeriod());
|
||||
$this->queue->insert($task, $this->currentTick + $task->getPeriod());
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user