diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnection.java b/proxy/src/main/java/net/md_5/bungee/ServerConnection.java index 1be12dbc..a3029106 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnection.java @@ -30,7 +30,7 @@ public class ServerConnection implements Server private boolean pingFailed; @Getter @Setter - private long sentPingId; + private long sentPingId = -1; private final Unsafe unsafe = new Unsafe() { diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index 29e763c7..ae3d900b 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -123,7 +123,7 @@ public class UpstreamBridge extends PacketHandler con.setPing( newPing ); } else { - if ( con.getServer().getSentPingId() != 0 && !con.getServer().isPingFailed() ) + if ( con.getServer().getSentPingId() != -1 && !con.getServer().isPingFailed() ) { alive.setRandomId( con.getServer().getSentPingId() ); con.getServer().unsafe().sendPacket( alive );