mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 16:45:13 +00:00
NetworkSession: Abort packet processing if handling triggered a disconnection
this shows up when requesting invalid data during resource pack handling, for example
This commit is contained in:
@ -415,6 +415,11 @@ class NetworkSession{
|
||||
$this->logger->debug($packet->getName() . ": " . base64_encode($buffer));
|
||||
throw PacketHandlingException::wrap($e, "Error processing " . $packet->getName());
|
||||
}
|
||||
if(!$this->isConnected()){
|
||||
//handling this packet may have caused a disconnection
|
||||
$this->logger->debug("Aborting batch processing due to server-side disconnection");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}catch(PacketDecodeException|BinaryDataException $e){
|
||||
$this->logger->logException($e);
|
||||
|
Reference in New Issue
Block a user