mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
TaskScheduler: do not push cancelled repeating tasks back onto the queue
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user