mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Merge branch 'release/3.3'
This commit is contained in:
commit
dd2861dd1a
@ -70,10 +70,6 @@ class RakLibInterface implements ServerInstance, AdvancedNetworkInterface{
|
||||
$this->server = $server;
|
||||
|
||||
$this->sleeper = new SleeperNotifier();
|
||||
$server->getTickSleeper()->addNotifier($this->sleeper, function() : void{
|
||||
//this should not throw any exception. If it does, this should crash the server since it's a fault condition.
|
||||
while($this->interface->handlePacket());
|
||||
});
|
||||
|
||||
$this->rakLib = new RakLibServer(
|
||||
$this->server->getLogger(),
|
||||
@ -87,6 +83,10 @@ class RakLibInterface implements ServerInstance, AdvancedNetworkInterface{
|
||||
}
|
||||
|
||||
public function start() : void{
|
||||
$this->server->getTickSleeper()->addNotifier($this->sleeper, function() : void{
|
||||
//this should not throw any exception. If it does, this should crash the server since it's a fault condition.
|
||||
while($this->interface->handlePacket());
|
||||
});
|
||||
$this->rakLib->start(PTHREADS_INHERIT_CONSTANTS); //HACK: MainLogger needs constants for exception logging
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user