#2261: Don't send any keep alive to server if invalid

This commit is contained in:
md_5 2017-09-23 17:14:03 +10:00
parent 69bbc3a71e
commit 8d49424226
2 changed files with 0 additions and 12 deletions

View File

@ -27,9 +27,6 @@ public class ServerConnection implements Server
private final boolean forgeServer = false;
@Getter
@Setter
private boolean pingFailed;
@Getter
@Setter
private long sentPingId = -1;
private final Unsafe unsafe = new Unsafe()

View File

@ -123,15 +123,6 @@ public class UpstreamBridge extends PacketHandler
con.setPing( newPing );
} else
{
if ( con.getServer().getSentPingId() != -1 && !con.getServer().isPingFailed() )
{
alive.setRandomId( con.getServer().getSentPingId() );
con.getServer().unsafe().sendPacket( alive );
con.getServer().setPingFailed( true );
con.getServer().setSentPingId( -1 );
}
throw CancelSendSignal.INSTANCE;
}
}