diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/limiter/SimpleBytesPerSecondLimiter.java b/proxy/src/main/java/com/velocitypowered/proxy/network/limiter/SimpleBytesPerSecondLimiter.java index 0551e7c27..1c6701be8 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/limiter/SimpleBytesPerSecondLimiter.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/limiter/SimpleBytesPerSecondLimiter.java @@ -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; }