Initialize ping to -1

This commit is contained in:
md_5 2017-09-23 13:56:23 +10:00
parent 23554239d0
commit af8d1af635
2 changed files with 2 additions and 2 deletions

View File

@ -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()
{

View File

@ -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 );