Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public CompletableFuture<RemoteVersion> fetchLatestDev() {
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);
Expand All @@ -92,7 +92,7 @@ public CompletableFuture<RemoteVersion> fetchLatestRelease() {
return pendingReleaseFuture;
}
pendingReleaseFuture = new CompletableFuture<>();
new Thread(() -> {
ess.runTaskAsynchronously(() -> {
catchBlock:
try {
final HttpURLConnection connection = tryRequestWithFallback(LATEST_RELEASE_URL, LATEST_RELEASE_PROXY_URL);
Expand Down Expand Up @@ -120,7 +120,7 @@ public CompletableFuture<RemoteVersion> fetchLatestRelease() {
}
pendingReleaseFuture = null;
lastFetchTime = System.currentTimeMillis();
}).start();
});
return pendingReleaseFuture;
}
return CompletableFuture.completedFuture(cachedRelease);
Expand Down