From f4f7215a6a053f9e744ce54f79142a8ea19a2aa4 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 2 Sep 2021 17:33:09 +0200 Subject: [PATCH] Fix disabled packet limiter check --- .../viaversion/viaversion/connection/UserConnectionImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/connection/UserConnectionImpl.java b/common/src/main/java/com/viaversion/viaversion/connection/UserConnectionImpl.java index c4230fd50..5208f6a11 100644 --- a/common/src/main/java/com/viaversion/viaversion/connection/UserConnectionImpl.java +++ b/common/src/main/java/com/viaversion/viaversion/connection/UserConnectionImpl.java @@ -254,11 +254,11 @@ public class UserConnectionImpl implements UserConnection { @Override public boolean checkServerboundPacket() { - if (pendingDisconnect || !packetLimiterEnabled) { + if (pendingDisconnect) { return false; } // Increment received + Check PPS - return !packetTracker.incrementReceived() || !packetTracker.exceedsMaxPPS(); + return !packetLimiterEnabled || !packetTracker.incrementReceived() || !packetTracker.exceedsMaxPPS(); } @Override