mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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);
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* Called every tick to process events on the interface.
|
||||
*/
|
||||
public function process() : bool;
|
||||
public function process() : void;
|
||||
|
||||
public function shutdown();
|
||||
|
||||
|
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user