#2752: Configurable connect and ping timeouts
This commit is contained in:
@@ -183,7 +183,7 @@ public class BungeeServerInfo implements ServerInfo
|
||||
.channel( PipelineUtils.getChannel( socketAddress ) )
|
||||
.group( BungeeCord.getInstance().eventLoops )
|
||||
.handler( PipelineUtils.BASE )
|
||||
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000 ) // TODO: Configurable
|
||||
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, BungeeCord.getInstance().getConfig().getRemotePingTimeout() )
|
||||
.remoteAddress( socketAddress )
|
||||
.connect()
|
||||
.addListener( listener );
|
||||
|
@@ -55,6 +55,8 @@ public class Configuration implements ProxyConfig
|
||||
private int remotePingCache = -1;
|
||||
private int playerLimit = -1;
|
||||
private Collection<String> disabledCommands;
|
||||
private int serverConnectTimeout = 5000;
|
||||
private int remotePingTimeout = 5000;
|
||||
private int throttle = 4000;
|
||||
private int throttleLimit = 3;
|
||||
private boolean ipForward;
|
||||
@@ -88,6 +90,8 @@ public class Configuration implements ProxyConfig
|
||||
logPings = adapter.getBoolean( "log_pings", logPings );
|
||||
remotePingCache = adapter.getInt( "remote_ping_cache", remotePingCache );
|
||||
playerLimit = adapter.getInt( "player_limit", playerLimit );
|
||||
serverConnectTimeout = adapter.getInt( "server_connect_timeout", serverConnectTimeout );
|
||||
remotePingTimeout = adapter.getInt( "remote_ping_timeout", remotePingTimeout );
|
||||
throttle = adapter.getInt( "connection_throttle", throttle );
|
||||
throttleLimit = adapter.getInt( "connection_throttle_limit", throttleLimit );
|
||||
ipForward = adapter.getBoolean( "ip_forward", ipForward );
|
||||
|
Reference in New Issue
Block a user