Skip to content

Commit bdda54d

Browse files
committed
Use 4 second moving window for packet limiter
1 parent 064b18f commit bdda54d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/kotlin/com/lambda/module/modules/network/PacketLimiter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ object PacketLimiter : Module(
3636
private var packetQueue = LimitedDecayQueue<PacketEvent.Send.Pre>(99, 1000)
3737
private val limit by setting("Limit", 99, 1..100, 1, "The maximum amount of packets to send per given time interval", unit = " packets")
3838
.onValueChange { _, to -> packetQueue.setSizeLimit(to) }
39-
40-
private val interval by setting("Duration", 1000L, 1L..1000L, 50L, "The interval / duration in milliseconds to limit packets for", unit = " ms")
39+
40+
private val interval by setting("Duration", 4000L, 1L..10000L, 50L, "The interval / duration in milliseconds to limit packets for", unit = " ms")
4141
.onValueChange { _, to -> packetQueue.setDecayTime(to) }
4242

4343
private val defaultIgnorePackets = setOf(

0 commit comments

Comments
 (0)