Skip to content

Commit 169744b

Browse files
committed
Fix fetching version info fallback errors
1 parent 67f4cd9 commit 169744b

File tree

1 file changed

+4
-4
lines changed
  • bukkit/src/main/java/io/github/rothes/protocolstringreplacer

1 file changed

+4
-4
lines changed

bukkit/src/main/java/io/github/rothes/protocolstringreplacer/Updater.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ private String getJson(String domain, int tryTime) {
128128
errorCount = Math.max(errorCount - 1, 0);
129129
return jsonBuilder.toString();
130130
} catch (IOException e) {
131-
if (errorCount < 3) {
132-
errorCount++;
133-
ProtocolStringReplacer.error(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Error-Checking-Version", e.toString()));
134-
}
135131
if (tryTime == 0) {
136132
return getJson("mirror.ghproxy.com/https://raw.githubusercontent.com", ++tryTime);
137133
} else if (tryTime == 1) {
138134
return getJson("raw.githubusercontent.com", ++tryTime);
139135
}
136+
if (errorCount < 3) {
137+
errorCount++;
138+
ProtocolStringReplacer.error(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Error-Checking-Version", e.toString()));
139+
}
140140
return null;
141141
}
142142
}

0 commit comments

Comments
 (0)