remove mojang pinger debug

This commit is contained in:
Lee 2024-04-21 03:08:15 +01:00
parent f85ed49545
commit 7df4fda744
2 changed files with 1 additions and 2 deletions

@ -19,6 +19,7 @@ import java.io.ByteArrayInputStream;
public class ServerPreviewRenderer extends Renderer<MinecraftServer> { public class ServerPreviewRenderer extends Renderer<MinecraftServer> {
public static final ServerPreviewRenderer INSTANCE = new ServerPreviewRenderer(); public static final ServerPreviewRenderer INSTANCE = new ServerPreviewRenderer();
private static BufferedImage SERVER_BACKGROUND; private static BufferedImage SERVER_BACKGROUND;
private static BufferedImage PING_ICON; private static BufferedImage PING_ICON;
static { static {

@ -194,9 +194,7 @@ public class MojangService {
try { try {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
InetAddress address = InetAddress.getByName(endpoint.getHostname()); InetAddress address = InetAddress.getByName(endpoint.getHostname());
log.info("gotaddr {}, {}", endpoint.getHostname(), (System.currentTimeMillis() - start) + "ms");
if (address.isReachable((int) TimeUnit.SECONDS.toMillis(4))) { // Check if the endpoint is reachable if (address.isReachable((int) TimeUnit.SECONDS.toMillis(4))) { // Check if the endpoint is reachable
log.info("isreachable {}, {}", endpoint.getHostname(), (System.currentTimeMillis() - start) + "ms");
endpoint.setStatus(EndpointStatus.Status.ONLINE); endpoint.setStatus(EndpointStatus.Status.ONLINE);
return; return;
} }