NetworkSession: do not rate limit packets if a debugging session is active

This commit is contained in:
Dylan K. Taylor 2023-01-08 19:31:39 +00:00
parent 6cecd690b2
commit 267032cff9
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -358,10 +358,12 @@ class NetworkSession{
return;
}
if($this->incomingPacketBatchBudget <= 0){
throw new PacketHandlingException("Receiving packets too fast");
if(!function_exists('xdebug_is_debugger_active') || !xdebug_is_debugger_active()){
if($this->incomingPacketBatchBudget <= 0){
throw new PacketHandlingException("Receiving packets too fast");
}
$this->incomingPacketBatchBudget--;
}
$this->incomingPacketBatchBudget--;
if($this->cipher !== null){
Timings::$playerNetworkReceiveDecrypt->startTiming();