Skip to content

Commit

Permalink
ignore connection timed out
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkGoosik committed Jul 23, 2023
1 parent 18443d0 commit 309a37a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/java/ru/pinkgoosik/kitsun/api/mojang/MojangAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import ru.pinkgoosik.kitsun.util.UrlParser;

import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
Expand All @@ -21,6 +22,9 @@ public static Optional<VersionManifest> getManifest() {
try {
return Optional.of(UrlParser.get(MANIFEST, VersionManifest.class));
}
catch(ConnectException e) {
return Optional.empty();
}
catch(Exception e) {
KitsunDebugger.report("Failed to parse minecraft versions manifest due to an exception:\n" + e);
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/ru/pinkgoosik/kitsun/schedule/Scheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public static void start() {
timer.schedule(new TimerTask() {
@Override
public void run() {
KitsunDebugger.CACHE.clear();
MCUpdatesScheduler.schedule();
}
}, 0, 5 * (60 * 1000));
Expand Down

0 comments on commit 309a37a

Please sign in to comment.