mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Replace disallowed operators in src/network/
This commit is contained in:
@ -180,7 +180,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
|
||||
public function onPacketReceive(int $sessionId, string $packet) : void{
|
||||
if(isset($this->sessions[$sessionId])){
|
||||
if($packet === "" or $packet[0] !== self::MCPE_RAKNET_PACKET_ID){
|
||||
if($packet === "" || $packet[0] !== self::MCPE_RAKNET_PACKET_ID){
|
||||
$this->sessions[$sessionId]->getLogger()->debug("Non-FE packet received: " . base64_encode($packet));
|
||||
return;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ class RakLibServer extends Thread{
|
||||
public function startAndWait(int $options = PTHREADS_INHERIT_NONE) : void{
|
||||
$this->start($options);
|
||||
$this->synchronized(function() : void{
|
||||
while(!$this->ready and $this->crashInfo === null){
|
||||
while(!$this->ready && $this->crashInfo === null){
|
||||
$this->wait();
|
||||
}
|
||||
$crashInfo = $this->crashInfo;
|
||||
|
Reference in New Issue
Block a user