Merge branch 'release/3.3'

This commit is contained in:
Dylan K. Taylor 2018-09-11 19:49:51 +01:00
commit dd2861dd1a

View File

@ -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
}