mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-10 11:15:06 +00:00
parent
997fb1800e
commit
695546420f
1 changed files with 4 additions and 4 deletions
|
@ -76,11 +76,11 @@ public final class UpdateChecker {
|
|||
return pendingDevFuture;
|
||||
}
|
||||
pendingDevFuture = new CompletableFuture<>();
|
||||
new Thread(() -> {
|
||||
ess.runTaskAsynchronously(() -> {
|
||||
pendingDevFuture.complete(cachedDev = fetchDistance(BRANCH, getVersionIdentifier()));
|
||||
pendingDevFuture = null;
|
||||
lastFetchTime = System.currentTimeMillis();
|
||||
}).start();
|
||||
});
|
||||
return pendingDevFuture;
|
||||
}
|
||||
return CompletableFuture.completedFuture(cachedDev);
|
||||
|
@ -92,7 +92,7 @@ public final class UpdateChecker {
|
|||
return pendingReleaseFuture;
|
||||
}
|
||||
pendingReleaseFuture = new CompletableFuture<>();
|
||||
new Thread(() -> {
|
||||
ess.runTaskAsynchronously(() -> {
|
||||
catchBlock:
|
||||
try {
|
||||
final HttpURLConnection connection = tryRequestWithFallback(LATEST_RELEASE_URL, LATEST_RELEASE_PROXY_URL);
|
||||
|
@ -120,7 +120,7 @@ public final class UpdateChecker {
|
|||
}
|
||||
pendingReleaseFuture = null;
|
||||
lastFetchTime = System.currentTimeMillis();
|
||||
}).start();
|
||||
});
|
||||
return pendingReleaseFuture;
|
||||
}
|
||||
return CompletableFuture.completedFuture(cachedRelease);
|
||||
|
|
Loading…
Reference in a new issue