increase the timeout for mojang servers
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 3m12s

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"), LIBRARIES("Libraries Server", "https://libraries.minecraft.net"),
SERVICES("Minecraft Services", "https://api.minecraftservices.com"); 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. * The name of this server.
@ -58,7 +58,7 @@ public enum MojangServer {
ex.printStackTrace(); ex.printStackTrace();
} catch (IOException ignored) { } catch (IOException ignored) {
// We can safely ignore any errors, we're simply checking // 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; return Status.OFFLINE;
} }

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