#3241: Support ping passthrough for legacy pings

This commit is contained in:
Kevin Ludwig
2022-07-02 10:26:28 +10:00
committed by md_5
parent e151a6cf92
commit d221e52929
2 changed files with 49 additions and 34 deletions

View File

@@ -28,18 +28,13 @@ public abstract class AbstractReconnectHandler implements ReconnectHandler
public static ServerInfo getForcedHost(PendingConnection con)
{
if ( con.getVirtualHost() == null )
{
return null;
}
String forced = con.getListener().getForcedHosts().get( con.getVirtualHost().getHostString() );
String forced = ( con.getVirtualHost() == null ) ? null : con.getListener().getForcedHosts().get( con.getVirtualHost().getHostString() );
if ( forced == null && con.getListener().isForceDefault() )
{
forced = con.getListener().getDefaultServer();
}
return ProxyServer.getInstance().getServerInfo( forced );
return ( forced == null ) ? null : ProxyServer.getInstance().getServerInfo( forced );
}
protected abstract ServerInfo getStoredServer(ProxiedPlayer player);