Skip to content

Commit

Permalink
Assume outdated if checking version fails
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Mar 4, 2016
1 parent 90e0f6f commit 63bb8a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/me/nallar/modpatcher/ModPatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,13 @@ private static void startVersionCheck() {
if (!updateRequired.isDone() || updateRequired.isCancelled() || !updateRequired.get()) {
FutureTask<Boolean> task;
updateRequired = task = new FutureTask<>(() -> {
Version current = getLastVersion();
Version current;
try {
current = getLastVersion();
} catch (Exception e) {
current = Version.NONE;
log.warn("Failed to determine current ModPatcher version, assuming it is outdated", e);
}
if (requiredVersion.newerThan(current)) {
try {
Version online = new Version(Resources.toString(new URL(System.getProperty(VERSION_URL_PROPERTY, "https://modpatcher.nallar.me/" + getModPatcherRelease() + "/version.txt")), Charsets.UTF_8).trim());
Expand Down

0 comments on commit 63bb8a2

Please sign in to comment.