From 77bd9a7c7e53f03931887648127f38686daab382 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 Apr 2024 16:27:19 +0100 Subject: [PATCH] cleanup --- src/main/java/cc/fascinated/service/MojangService.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/cc/fascinated/service/MojangService.java b/src/main/java/cc/fascinated/service/MojangService.java index db667e4..1157667 100644 --- a/src/main/java/cc/fascinated/service/MojangService.java +++ b/src/main/java/cc/fascinated/service/MojangService.java @@ -208,13 +208,9 @@ public class MojangService { futures.add(future); } - - // - CompletableFuture allFutures = CompletableFuture.allOf( - futures.toArray(new CompletableFuture[0])); - + CompletableFuture allFutures = CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])); try { - allFutures.get(5, TimeUnit.SECONDS); // Timeout in 10 seconds + allFutures.get(5, TimeUnit.SECONDS); // Wait for the futures to complete } catch (Exception e) { log.error("Timeout while fetching Mojang API status: {}", e.getMessage()); }