This commit is contained in:
Dylan K. Taylor 2021-11-01 16:13:33 +00:00
parent f6480017ce
commit c3768b997a
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 8 additions and 4 deletions

8
composer.lock generated
View File

@ -253,12 +253,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pmmp/BedrockProtocol.git", "url": "https://github.com/pmmp/BedrockProtocol.git",
"reference": "c8d891b4dff9817d5fcd373dfec0608b20be3b0a" "reference": "146498c279b3dc645ab6b8cdf45f7b96d8a33f8b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/c8d891b4dff9817d5fcd373dfec0608b20be3b0a", "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/146498c279b3dc645ab6b8cdf45f7b96d8a33f8b",
"reference": "c8d891b4dff9817d5fcd373dfec0608b20be3b0a", "reference": "146498c279b3dc645ab6b8cdf45f7b96d8a33f8b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -293,7 +293,7 @@
"issues": "https://github.com/pmmp/BedrockProtocol/issues", "issues": "https://github.com/pmmp/BedrockProtocol/issues",
"source": "https://github.com/pmmp/BedrockProtocol/tree/master" "source": "https://github.com/pmmp/BedrockProtocol/tree/master"
}, },
"time": "2021-10-29T20:54:42+00:00" "time": "2021-11-01T15:46:55+00:00"
}, },
{ {
"name": "pocketmine/binaryutils", "name": "pocketmine/binaryutils",

View File

@ -348,6 +348,10 @@ class NetworkSession{
try{ try{
foreach($stream->getPackets($this->packetPool, $this->packetSerializerContext, 500) as [$packet, $buffer]){ foreach($stream->getPackets($this->packetPool, $this->packetSerializerContext, 500) as [$packet, $buffer]){
if($packet === null){
$this->logger->debug("Unknown packet: " . base64_encode($buffer));
throw new PacketHandlingException("Unknown packet received");
}
try{ try{
$this->handleDataPacket($packet, $buffer); $this->handleDataPacket($packet, $buffer);
}catch(PacketHandlingException $e){ }catch(PacketHandlingException $e){