mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
#2786: Should first peek keepalive queue
This commit is contained in:
parent
67c2dfd884
commit
2f54c94372
@ -122,10 +122,11 @@ public class UpstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(KeepAlive alive) throws Exception
|
||||
{
|
||||
KeepAliveData keepAliveData = con.getServer().getKeepAlives().poll();
|
||||
KeepAliveData keepAliveData = con.getServer().getKeepAlives().peek();
|
||||
|
||||
if ( keepAliveData != null && alive.getRandomId() == keepAliveData.getId() )
|
||||
{
|
||||
Preconditions.checkState( keepAliveData == con.getServer().getKeepAlives().poll(), "keepalive queue mismatch" );
|
||||
int newPing = (int) ( System.currentTimeMillis() - keepAliveData.getTime() );
|
||||
con.getTabListHandler().onPingChange( newPing );
|
||||
con.setPing( newPing );
|
||||
|
Loading…
Reference in New Issue
Block a user