From 0246648a2ccb7d8bb222b08e1a595b94d983737a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 18 Aug 2014 23:25:46 +0200 Subject: [PATCH] Possible solution for #1703 in-game action lag --- src/pocketmine/network/RakLibInterface.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/network/RakLibInterface.php b/src/pocketmine/network/RakLibInterface.php index f996c70d0..604569f0d 100644 --- a/src/pocketmine/network/RakLibInterface.php +++ b/src/pocketmine/network/RakLibInterface.php @@ -117,7 +117,12 @@ class RakLibInterface implements ServerInstance, SourceInterface{ } public function process(){ - return $this->interface->handlePacket(); + $work = false; + if($this->interface->handlePacket()){ + $work = true; + while($this->interface->handlePacket()){} + } + return $work; } public function closeSession($identifier, $reason){