远端配置无法读取,使用本地缓存 (#1740)
* 远端配置无法读取,使用本地缓存 * 远程配置&本地配置确认 * fix err * fix-err * fix-err * fix-err * fix-err * restore * code clean * fix-err * add * fix * 远端读取异常日志 Co-authored-by: zkitefly <64117916+zkitefly@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a8b09e2195
commit
0f4a5c26df
@@ -185,11 +185,14 @@ public final class MultiplayerManager {
|
|||||||
// 下载 HiPer 配置文件
|
// 下载 HiPer 配置文件
|
||||||
String certFileContent;
|
String certFileContent;
|
||||||
try {
|
try {
|
||||||
certFileContent = HttpRequest.GET(String.format("https://cert.mcer.cn/%s.yml", token)).getString() + "\nlogging:\n format: json\n file_path: ./hiper.log";
|
certFileContent = HttpRequest.GET(String.format("https://cert.mcer.cn/%s.yml", token)).getString();
|
||||||
} catch (IOException e) {
|
if (!certFileContent.equals("")) {
|
||||||
throw new HiperInvalidTokenException();
|
certFileContent += "\nlogging:\n format: json\n file_path: ./hiper.log";
|
||||||
}
|
|
||||||
FileUtils.writeText(HIPER_CONFIG_PATH, certFileContent);
|
FileUtils.writeText(HIPER_CONFIG_PATH, certFileContent);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.warning(Level.WARNING, "configuration file cloud cache index code has been not available , try to use the local configuration file", e);
|
||||||
|
}
|
||||||
|
|
||||||
String[] commands = new String[]{HIPER_PATH.toString(), "-config", HIPER_CONFIG_PATH.toString()};
|
String[] commands = new String[]{HIPER_PATH.toString(), "-config", HIPER_CONFIG_PATH.toString()};
|
||||||
Process process = new ProcessBuilder()
|
Process process = new ProcessBuilder()
|
||||||
|
|||||||
Reference in New Issue
Block a user