Archiviert
13
0

Delay initial ping sent to the client

Dieser Commit ist enthalten in:
Shane Freeder 2018-03-31 15:27:41 +01:00
Ursprung fad15a6acc
Commit ad2cf784b0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -1,4 +1,4 @@
From c0932b4bd2689009449872c10b1ef7e8689b5f3f Mon Sep 17 00:00:00 2001
From 5bd9a97eae668ba2c26a59782e9164182671a19b Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 15 Oct 2017 00:29:07 +0100
Subject: [PATCH] revert serverside behavior of keepalives
@ -17,9 +17,18 @@ 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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 869a2b402..167e386c8 100644
index 869a2b402..284db9b9e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -68,7 +68,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
private final MinecraftServer minecraftServer;
public EntityPlayer player;
private int e;
- private long f; private void setLastPing(long lastPing) { this.f = lastPing;}; private long getLastPing() { return this.f;}; // Paper - OBFHELPER
+ private long f = getCurrentMillis(); private void setLastPing(long lastPing) { this.f = lastPing;}; private long getLastPing() { return this.f;}; // Paper - OBFHELPER - set ping to delay initial
private boolean g; private void setPendingPing(boolean isPending) { this.g = isPending;}; private boolean isPendingPing() { return this.g;}; // Paper - OBFHELPER
private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER
// CraftBukkit start - multithreaded fields
@@ -100,6 +100,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
private int receivedMovePackets;
private int processedMovePackets;
@ -65,5 +74,5 @@ index 869a2b402..167e386c8 100644
this.minecraftServer.methodProfiler.b();
// CraftBukkit start
--
2.16.2
2.16.3