diff --git a/src/pocketmine/network/SourceInterface.php b/src/pocketmine/network/SourceInterface.php index 706ab5fafe..e5a6b679a9 100644 --- a/src/pocketmine/network/SourceInterface.php +++ b/src/pocketmine/network/SourceInterface.php @@ -65,9 +65,9 @@ interface SourceInterface{ public function setName(string $name); /** - * @return bool + * Called every tick to process events on the interface. */ - public function process() : bool; + public function process() : void; public function shutdown(); diff --git a/src/pocketmine/network/mcpe/RakLibInterface.php b/src/pocketmine/network/mcpe/RakLibInterface.php index 2f476c6bca..1002353de4 100644 --- a/src/pocketmine/network/mcpe/RakLibInterface.php +++ b/src/pocketmine/network/mcpe/RakLibInterface.php @@ -89,19 +89,12 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{ $this->network = $network; } - public function process() : bool{ - $work = false; - if($this->interface->handlePacket()){ - $work = true; - while($this->interface->handlePacket()){ - } - } + public function process() : void{ + while($this->interface->handlePacket()){} if(!$this->rakLib->isRunning() and !$this->rakLib->isShutdown()){ throw new \Exception("RakLib Thread crashed"); } - - return $work; } public function closeSession(string $identifier, string $reason) : void{