mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
Issue 1843 - RCON worker threads synchronization corrected
This commit is contained in:
@ -85,11 +85,15 @@ class RCON{
|
||||
}elseif($this->workers[$n]->isWaiting()){
|
||||
if($this->workers[$n]->response !== ""){
|
||||
MainLogger::getLogger()->info($this->workers[$n]->response);
|
||||
$this->workers[$n]->notify();
|
||||
$this->workers[$n]->synchronized(function($thread){
|
||||
$thread->notify();
|
||||
}, $this->workers[$n]);
|
||||
}else{
|
||||
Server::getInstance()->dispatchCommand($response = new RemoteConsoleCommandSender(), $this->workers[$n]->cmd);
|
||||
$this->workers[$n]->response = TextFormat::clean($response->getMessage());
|
||||
$this->workers[$n]->notify();
|
||||
$this->workers[$n]->synchronized(function($thread){
|
||||
$thread->notify();
|
||||
}, $this->workers[$n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user