Skip to content

Commit

Permalink
Fix fetching version info fallback errors
Browse files Browse the repository at this point in the history
Rothes committed Dec 6, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent 67f4cd9 commit 169744b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -128,15 +128,15 @@ private String getJson(String domain, int tryTime) {
errorCount = Math.max(errorCount - 1, 0);
return jsonBuilder.toString();
} catch (IOException e) {
if (errorCount < 3) {
errorCount++;
ProtocolStringReplacer.error(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Error-Checking-Version", e.toString()));
}
if (tryTime == 0) {
return getJson("mirror.ghproxy.com/https://raw.githubusercontent.com", ++tryTime);
} else if (tryTime == 1) {
return getJson("raw.githubusercontent.com", ++tryTime);
}
if (errorCount < 3) {
errorCount++;
ProtocolStringReplacer.error(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Error-Checking-Version", e.toString()));
}
return null;
}
}

0 comments on commit 169744b

Please sign in to comment.