refactor: 在启动时, 只要 Xray-Core 存在, 则允许检查新版本失败.

This commit is contained in:
2025-02-19 20:12:32 +08:00
parent 15ad1c4bb5
commit c7a7140d28
+13 -5
View File
@@ -260,12 +260,20 @@ public class XrayCoreManager(
}
else
{
var latestXrayCoreVersion = await GetLatestXrayCoreVersion();
if (currentVersion != latestXrayCoreVersion)
try
{
requiredUpdate = true;
logger.LogInformation("发现新版本 Xray-Core (Version: {latestVersion}), 开始下载最新版本...",
latestXrayCoreVersion);
var latestXrayCoreVersion = await GetLatestXrayCoreVersion();
if (currentVersion != latestXrayCoreVersion)
{
requiredUpdate = true;
logger.LogInformation("发现新版本 Xray-Core (Version: {latestVersion}), 开始下载最新版本...",
latestXrayCoreVersion);
}
}
catch (HttpRequestException e)
{
logger.LogError(e, "检查 Xray-Core 更新时发生错误, 跳过更新.");
return;
}
}