mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +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;
|
continue;
|
||||||
}
|
}
|
||||||
$task->run($this->currentTick);
|
$task->run($this->currentTick);
|
||||||
if($task->isRepeating()){
|
if(!$task->isCancelled() && $task->isRepeating()){
|
||||||
$task->setNextRun($this->currentTick + $task->getPeriod());
|
$task->setNextRun($this->currentTick + $task->getPeriod());
|
||||||
$this->queue->insert($task, $this->currentTick + $task->getPeriod());
|
$this->queue->insert($task, $this->currentTick + $task->getPeriod());
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user