Merge branch 'next-minor' into next-major

This commit is contained in:
Dylan K. Taylor
2023-01-18 19:05:44 +00:00
5 changed files with 120 additions and 9 deletions

View File

@ -37,6 +37,7 @@ use pocketmine\network\NetworkInterfaceStartException;
use pocketmine\network\PacketHandlingException;
use pocketmine\Server;
use pocketmine\snooze\SleeperNotifier;
use pocketmine\timings\Timings;
use pocketmine\utils\Utils;
use raklib\generic\SocketException;
use raklib\protocol\EncapsulatedPacket;
@ -109,7 +110,12 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
public function start() : void{
$this->server->getTickSleeper()->addNotifier($this->sleeper, function() : void{
while($this->eventReceiver->handle($this));
Timings::$connection->startTiming();
try{
while($this->eventReceiver->handle($this));
}finally{
Timings::$connection->stopTiming();
}
});
$this->server->getLogger()->debug("Waiting for RakLib to start...");
try{