#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