NetworkSession: Stop processing batch if player gets disconnected during handling

This commit is contained in:
Dylan K. Taylor 2018-07-21 16:27:30 +01:00
parent 34d64be427
commit 57e5b1309d

View File

@ -99,7 +99,7 @@ class NetworkSession{
//TODO: decryption if enabled
$stream = new PacketStream(NetworkCompression::decompress($payload));
while(!$stream->feof()){
while(!$stream->feof() and $this->player->isConnected()){
$this->handleDataPacket(PacketPool::getPacket($stream->getString()));
}
}