mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-04 08:03:38 +01:00
Initialize ping to -1
This commit is contained in:
parent
23554239d0
commit
af8d1af635
@ -30,7 +30,7 @@ public class ServerConnection implements Server
|
|||||||
private boolean pingFailed;
|
private boolean pingFailed;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
private long sentPingId;
|
private long sentPingId = -1;
|
||||||
|
|
||||||
private final Unsafe unsafe = new Unsafe()
|
private final Unsafe unsafe = new Unsafe()
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ public class UpstreamBridge extends PacketHandler
|
|||||||
con.setPing( newPing );
|
con.setPing( newPing );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if ( con.getServer().getSentPingId() != 0 && !con.getServer().isPingFailed() )
|
if ( con.getServer().getSentPingId() != -1 && !con.getServer().isPingFailed() )
|
||||||
{
|
{
|
||||||
alive.setRandomId( con.getServer().getSentPingId() );
|
alive.setRandomId( con.getServer().getSentPingId() );
|
||||||
con.getServer().unsafe().sendPacket( alive );
|
con.getServer().unsafe().sendPacket( alive );
|
||||||
|
Loading…
Reference in New Issue
Block a user