#2261: Don't send any keep alive to server if invalid
This commit is contained in:
parent
69bbc3a71e
commit
8d49424226
@ -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()
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user