mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 06:57:39 +01:00
parent
997fb1800e
commit
695546420f
@ -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 New Issue
Block a user