mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +00:00
SourceInterface: removed redundant return value from process()
This commit is contained in:
parent
38c3f00ef7
commit
f497e43db3
@ -65,9 +65,9 @@ interface SourceInterface{
|
|||||||
public function setName(string $name);
|
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();
|
public function shutdown();
|
||||||
|
|
||||||
|
@ -89,19 +89,12 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
|||||||
$this->network = $network;
|
$this->network = $network;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function process() : bool{
|
public function process() : void{
|
||||||
$work = false;
|
while($this->interface->handlePacket()){}
|
||||||
if($this->interface->handlePacket()){
|
|
||||||
$work = true;
|
|
||||||
while($this->interface->handlePacket()){
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$this->rakLib->isRunning() and !$this->rakLib->isShutdown()){
|
if(!$this->rakLib->isRunning() and !$this->rakLib->isShutdown()){
|
||||||
throw new \Exception("RakLib Thread crashed");
|
throw new \Exception("RakLib Thread crashed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $work;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function closeSession(string $identifier, string $reason) : void{
|
public function closeSession(string $identifier, string $reason) : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user