Fixed garbage AsyncTasks cannot be accessed

This commit is contained in:
SOFe
2016-11-12 17:47:07 +08:00
parent e6485c4734
commit 7861822a0f

View File

@ -142,7 +142,7 @@ class AsyncPool{
Timings::$schedulerAsyncTimer->startTiming();
foreach($this->tasks as $task){
if($task->progressUpdates !== null){
if(!$task->isGarbage() and $task->progressUpdates !== null){
if($task->progressUpdates->count() !== 0){
$progress = $task->progressUpdates->shift();
$task->onProgressUpdate($this->server, $progress);