add debug
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m44s

This commit is contained in:
Lee 2024-04-19 18:06:04 +01:00
parent ad83e270b6
commit 5b8017e403

@ -195,7 +195,9 @@ 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());
System.out.printf("inataddr %s, %s%n", 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
System.out.printf("isreachable %s, %s%n", endpoint.getHostname(), (System.currentTimeMillis() - start) + "ms");
endpoint.setStatus(EndpointStatus.Status.ONLINE); endpoint.setStatus(EndpointStatus.Status.ONLINE);
return; return;
} }