aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0158-revert-serverside-behavior-of-keepalives.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0158-revert-serverside-behavior-of-keepalives.patch')
-rw-r--r--patches/server/0158-revert-serverside-behavior-of-keepalives.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0158-revert-serverside-behavior-of-keepalives.patch b/patches/server/0158-revert-serverside-behavior-of-keepalives.patch
index fa7ee14322..167f18e6c9 100644
--- a/patches/server/0158-revert-serverside-behavior-of-keepalives.patch
+++ b/patches/server/0158-revert-serverside-behavior-of-keepalives.patch
@@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
-index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..b8b22a2b140b4d757add6eefa562d32430fb7424 100644
+index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..a0dc17702fb6c8c96f262bc917624a46a40920fa 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -68,7 +68,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -49,8 +49,8 @@ index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..b8b22a2b140b4d757add6eefa562d324
- if (!this.isSingleplayerOwner() && i - this.keepAliveTime >= 25000L) { // CraftBukkit
- if (this.keepAlivePending) {
-+ if (!this.isSingleplayerOwner() && elapsedTime >= KEEPALIVE_LIMIT) { // Paper - check keepalive limit, don't fire if already disconnected
-+ if (this.keepAlivePending && !this.processedDisconnect) { // Paper
++ if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // Paper - use vanilla's 15000L between keep alive packets
++ if (this.keepAlivePending && !this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // Paper - check keepalive limit, don't fire if already disconnected
this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE);
- } else if (this.checkIfClosed(i)) {
+ } else if (this.checkIfClosed(currentTime)) { // Paper