mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Improved chunk sending, moved chunk encoding and compression to another thread
This commit is contained in:
@ -215,12 +215,12 @@ class ServerScheduler{
|
||||
|
||||
if($this->asyncTasks > 0){ //Garbage collector
|
||||
$this->asyncPool->collect(function (AsyncTask $task){
|
||||
if($task->isFinished()){
|
||||
if($task->isFinished() and !$task->isCompleted()){
|
||||
--$this->asyncTasks;
|
||||
$task->onCompletion(Server::getInstance());
|
||||
$task->setCompleted();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user