mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
Merge branch 'minor-next' into major-next
This commit is contained in:
commit
cc69383b6f
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.27, 8.1.14, 8.2.1]
|
php: [8.0.28, 8.1.16, 8.2.3]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build and prepare PHP cache
|
- name: Build and prepare PHP cache
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.27, 8.1.14, 8.2.1]
|
php: [8.0.28, 8.1.16, 8.2.3]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -71,7 +71,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.27, 8.1.14, 8.2.1]
|
php: [8.0.28, 8.1.16, 8.2.3]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -110,7 +110,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.27, 8.1.14, 8.2.1]
|
php: [8.0.28, 8.1.16, 8.2.3]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -151,7 +151,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.27, 8.1.14, 8.2.1]
|
php: [8.0.28, 8.1.16, 8.2.3]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -34,9 +34,9 @@
|
|||||||
"adhocore/json-comment": "^1.1",
|
"adhocore/json-comment": "^1.1",
|
||||||
"fgrosse/phpasn1": "^2.3",
|
"fgrosse/phpasn1": "^2.3",
|
||||||
"netresearch/jsonmapper": "^4.0",
|
"netresearch/jsonmapper": "^4.0",
|
||||||
"pocketmine/bedrock-block-upgrade-schema": "^1.0.0",
|
"pocketmine/bedrock-block-upgrade-schema": "~1.0.0",
|
||||||
"pocketmine/bedrock-data": "~2.0.0+bedrock-1.19.60",
|
"pocketmine/bedrock-data": "~2.0.0+bedrock-1.19.60",
|
||||||
"pocketmine/bedrock-item-upgrade-schema": "^1.0.0",
|
"pocketmine/bedrock-item-upgrade-schema": "~1.0.0",
|
||||||
"pocketmine/bedrock-protocol": "~19.3.0+bedrock-1.19.62",
|
"pocketmine/bedrock-protocol": "~19.3.0+bedrock-1.19.62",
|
||||||
"pocketmine/binaryutils": "^0.2.1",
|
"pocketmine/binaryutils": "^0.2.1",
|
||||||
"pocketmine/callback-validator": "^1.0.2",
|
"pocketmine/callback-validator": "^1.0.2",
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"symfony/filesystem": "^5.4"
|
"symfony/filesystem": "^5.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "1.10.4",
|
"phpstan/phpstan": "1.10.6",
|
||||||
"phpstan/phpstan-phpunit": "^1.1.0",
|
"phpstan/phpstan-phpunit": "^1.1.0",
|
||||||
"phpstan/phpstan-strict-rules": "^1.2.0",
|
"phpstan/phpstan-strict-rules": "^1.2.0",
|
||||||
"phpunit/phpunit": "^9.2"
|
"phpunit/phpunit": "^9.2"
|
||||||
|
@ -428,8 +428,12 @@ class NetworkSession{
|
|||||||
throw new PacketHandlingException("Unexpected non-serverbound packet");
|
throw new PacketHandlingException("Unexpected non-serverbound packet");
|
||||||
}
|
}
|
||||||
|
|
||||||
$timings = Timings::getDecodeDataPacketTimings($packet);
|
$timings = Timings::getReceiveDataPacketTimings($packet);
|
||||||
$timings->startTiming();
|
$timings->startTiming();
|
||||||
|
|
||||||
|
try{
|
||||||
|
$decodeTimings = Timings::getDecodeDataPacketTimings($packet);
|
||||||
|
$decodeTimings->startTiming();
|
||||||
try{
|
try{
|
||||||
$stream = PacketSerializer::decoder($buffer, 0, $this->packetSerializerContext);
|
$stream = PacketSerializer::decoder($buffer, 0, $this->packetSerializerContext);
|
||||||
try{
|
try{
|
||||||
@ -442,11 +446,11 @@ class NetworkSession{
|
|||||||
$this->logger->debug("Still " . strlen($remains) . " bytes unread in " . $packet->getName() . ": " . bin2hex($remains));
|
$this->logger->debug("Still " . strlen($remains) . " bytes unread in " . $packet->getName() . ": " . bin2hex($remains));
|
||||||
}
|
}
|
||||||
}finally{
|
}finally{
|
||||||
$timings->stopTiming();
|
$decodeTimings->stopTiming();
|
||||||
}
|
}
|
||||||
|
|
||||||
$timings = Timings::getHandleDataPacketTimings($packet);
|
$handlerTimings = Timings::getHandleDataPacketTimings($packet);
|
||||||
$timings->startTiming();
|
$handlerTimings->startTiming();
|
||||||
try{
|
try{
|
||||||
//TODO: I'm not sure DataPacketReceiveEvent should be included in the handler timings, but it needs to be
|
//TODO: I'm not sure DataPacketReceiveEvent should be included in the handler timings, but it needs to be
|
||||||
//included for now to ensure the receivePacket timings are counted the way they were before
|
//included for now to ensure the receivePacket timings are counted the way they were before
|
||||||
@ -455,6 +459,9 @@ class NetworkSession{
|
|||||||
if(!$ev->isCancelled() && ($this->handler === null || !$packet->handle($this->handler))){
|
if(!$ev->isCancelled() && ($this->handler === null || !$packet->handle($this->handler))){
|
||||||
$this->logger->debug("Unhandled " . $packet->getName() . ": " . base64_encode($stream->getBuffer()));
|
$this->logger->debug("Unhandled " . $packet->getName() . ": " . base64_encode($stream->getBuffer()));
|
||||||
}
|
}
|
||||||
|
}finally{
|
||||||
|
$handlerTimings->stopTiming();
|
||||||
|
}
|
||||||
}finally{
|
}finally{
|
||||||
$timings->stopTiming();
|
$timings->stopTiming();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user