cleanup
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m40s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m40s
This commit is contained in:
parent
0b187a852c
commit
77bd9a7c7e
@ -208,13 +208,9 @@ public class MojangService {
|
|||||||
|
|
||||||
futures.add(future);
|
futures.add(future);
|
||||||
}
|
}
|
||||||
|
CompletableFuture<Void> allFutures = CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));
|
||||||
//
|
|
||||||
CompletableFuture<Void> allFutures = CompletableFuture.allOf(
|
|
||||||
futures.toArray(new CompletableFuture[0]));
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
allFutures.get(5, TimeUnit.SECONDS); // Timeout in 10 seconds
|
allFutures.get(5, TimeUnit.SECONDS); // Wait for the futures to complete
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Timeout while fetching Mojang API status: {}", e.getMessage());
|
log.error("Timeout while fetching Mojang API status: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user