This commit is contained in:
GameHerobrine 2023-10-08 20:26:18 +03:00
parent 070755ba8e
commit 88d7859b6b

View file

@ -39,10 +39,12 @@ class RCON{
public function stop(){ public function stop(){
for($n = 0; $n < $this->threads; ++$n){ for($n = 0; $n < $this->threads; ++$n){
$this->workers[$n]->close(); if(isset($this->workers[$n]) && $this->workers[$n] instanceof RCONInstance){
$this->workers[$n]->join(); $this->workers[$n]->close();
usleep(50000); $this->workers[$n]->join();
$this->workers[$n]->kill(); //usleep(50000);
//$this->workers[$n]->kill();
}
} }
@socket_close($this->socket); @socket_close($this->socket);
$this->threads = 0; $this->threads = 0;