increase the timeout for mojang servers

This commit is contained in:
Lee 2024-07-30 22:06:01 +01:00
parent 82fb2a3d23
commit c796875d8c
2 changed files with 2 additions and 3 deletions

@ -24,7 +24,7 @@ public enum MojangServer {
LIBRARIES("Libraries Server", "https://libraries.minecraft.net"),
SERVICES("Minecraft Services", "https://api.minecraftservices.com");
private static final long STATUS_TIMEOUT = TimeUnit.SECONDS.toMillis(4);
private static final long STATUS_TIMEOUT = TimeUnit.SECONDS.toMillis(10);
/**
* The name of this server.
@ -58,7 +58,7 @@ public enum MojangServer {
ex.printStackTrace();
} catch (IOException ignored) {
// We can safely ignore any errors, we're simply checking
// if the host is reachable, if it's not, it's offline.
// if the host is reachable, if it's not, then it's offline.
}
return Status.OFFLINE;
}

@ -19,7 +19,6 @@ import java.util.concurrent.TimeUnit;
@RequestMapping(value = "/mojang/", produces = MediaType.APPLICATION_JSON_VALUE)
@Tag(name = "Mojang Controller", description = "The Mojang Controller is used to get information about the Mojang APIs.")
public class MojangController {
@Autowired
private MojangService mojangService;