mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Delay initial ping sent to the client
This commit is contained in:
parent
fad15a6acc
commit
ad2cf784b0
1 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue