mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Fixed kick messages
This commit is contained in:
@ -39,16 +39,6 @@ abstract class AsyncTask extends \Threaded{
|
||||
$this->result = null;
|
||||
$this->onRun();
|
||||
$this->finished = true;
|
||||
$this->complete = $this->result === null ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isCompleted(){
|
||||
return $this->synchronized(function(){
|
||||
return $this->complete === true;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -215,7 +215,7 @@ class ServerScheduler{
|
||||
|
||||
if($this->asyncTasks > 0){ //Garbage collector
|
||||
$this->asyncPool->collect(function (AsyncTask $task){
|
||||
if($task->isCompleted() or ($task->isFinished() and !$task->hasResult())){
|
||||
if($task->isFinished()){
|
||||
--$this->asyncTasks;
|
||||
$task->onCompletion(Server::getInstance());
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user