13
0
geforkt von Mirrors/Velocity

Fix case-sensitivity for ping passthrough

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-04-22 11:23:42 -04:00
Ursprung ca52f8989e
Commit ce26ae76c2

Datei anzeigen

@ -41,6 +41,7 @@ import io.netty.buffer.ByteBuf;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import org.apache.logging.log4j.LogManager;
@ -167,6 +168,7 @@ public class StatusSessionHandler implements MinecraftSessionHandler {
return CompletableFuture.completedFuture(constructLocalPing(shownVersion));
} else {
String virtualHostStr = inbound.getVirtualHost().map(InetSocketAddress::getHostString)
.map(str -> str.toLowerCase(Locale.ROOT))
.orElse("");
List<String> serversToTry = server.getConfiguration().getForcedHosts().getOrDefault(
virtualHostStr, server.getConfiguration().getAttemptConnectionOrder());