File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ public function __construct(
100100 private int $ recvMaxSplitParts = ServerSession::DEFAULT_MAX_SPLIT_PART_COUNT ,
101101 private int $ recvMaxConcurrentSplits = ServerSession::DEFAULT_MAX_CONCURRENT_SPLIT_COUNT ,
102102 private int $ blockMessageSuppressionThreshold = self ::BLOCK_MESSAGE_SUPPRESSION_THRESHOLD ,
103- private int $ packetErrorSuppressionThreshold = self ::PACKET_ERROR_SUPPRESSION_THRESHOLD
103+ private int $ packetErrorSuppressionThreshold = self ::PACKET_ERROR_SUPPRESSION_THRESHOLD ,
104+ private bool $ blockIpOnPacketErrors = true
104105 ){
105106 if ($ maxMtuSize < Session::MIN_MTU_SIZE ){
106107 throw new \InvalidArgumentException ("MTU size must be at least " . Session::MIN_MTU_SIZE . ", got $ maxMtuSize " );
@@ -319,7 +320,9 @@ private function receivePacket() : bool{
319320 }
320321 }
321322 $ this ->packetErrorsSinceLastUpdate ++;
322- $ this ->blockAddress ($ address ->getIp (), 5 );
323+ if ($ this ->blockIpOnPacketErrors ){
324+ $ this ->blockAddress ($ address ->getIp (), 5 );
325+ }
323326 }
324327
325328 return true ;
You can’t perform that action at this time.
0 commit comments