mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
#2762: Work correctly with disabled timeout
This commit is contained in:
parent
3ce4132c58
commit
d3bd785289
@ -125,7 +125,8 @@ public class DownstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(KeepAlive alive) throws Exception
|
||||
{
|
||||
if ( server.getKeepAlives().size() < bungee.getConfig().getTimeout() / 50 ) // Allow a theoretical maximum of 1 keepalive per tick
|
||||
int timeout = bungee.getConfig().getTimeout();
|
||||
if ( timeout <= 0 || server.getKeepAlives().size() < timeout / 50 ) // Some people disable timeout, otherwise allow a theoretical maximum of 1 keepalive per tick
|
||||
{
|
||||
server.getKeepAlives().add( new KeepAliveData( alive.getRandomId(), System.currentTimeMillis() ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user