mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 06:27:42 +01:00
Properly setup interval counter
This commit is contained in:
@@ -46,8 +46,8 @@ public final class SimpleBytesPerSecondLimiter implements PacketLimiter {
|
||||
throw new IllegalArgumentException("windowSeconds must be > 0");
|
||||
}
|
||||
this.bytesPerSecond = bytesPerSecond;
|
||||
this.packetsCounter = packetsPerSecond > 0 ? new IntervalledCounter(windowSeconds) : null;
|
||||
this.bytesCounter = bytesPerSecond > 0 ? new IntervalledCounter(windowSeconds) : null;
|
||||
this.packetsCounter = packetsPerSecond > 0 ? new IntervalledCounter((long) (windowSeconds * 1.0e9)) : null;
|
||||
this.bytesCounter = bytesPerSecond > 0 ? new IntervalledCounter((long) (windowSeconds * 1.0e9)) : null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user