Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor
2019-04-21 16:56:53 +01:00
3 changed files with 15 additions and 10 deletions

View File

@ -260,7 +260,11 @@ class NetworkSession{
Timings::$playerNetworkReceiveDecompressTimer->stopTiming();
}
$count = 0;
while(!$stream->feof() and $this->connected){
if($count++ >= 500){
throw new BadPacketException("Too many packets in a single batch");
}
try{
$pk = PacketPool::getPacket($stream->getString());
}catch(BinaryDataException $e){