forked from MinecraftUtilities/Backend
add debug
This commit is contained in:
parent
5b8017e403
commit
8a8c6b542a
@ -195,9 +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");
|
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
|
||||||
System.out.printf("isreachable %s, %s%n", endpoint.getHostname(), (System.currentTimeMillis() - start) + "ms");
|
log.info("isreachable {}, {}", endpoint.getHostname(), (System.currentTimeMillis() - start) + "ms");
|
||||||
endpoint.setStatus(EndpointStatus.Status.ONLINE);
|
endpoint.setStatus(EndpointStatus.Status.ONLINE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user