refactor: 在启动时, 只要 Xray-Core 存在, 则允许检查新版本失败.
This commit is contained in:
@@ -260,12 +260,20 @@ public class XrayCoreManager(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var latestXrayCoreVersion = await GetLatestXrayCoreVersion();
|
try
|
||||||
if (currentVersion != latestXrayCoreVersion)
|
|
||||||
{
|
{
|
||||||
requiredUpdate = true;
|
var latestXrayCoreVersion = await GetLatestXrayCoreVersion();
|
||||||
logger.LogInformation("发现新版本 Xray-Core (Version: {latestVersion}), 开始下载最新版本...",
|
if (currentVersion != latestXrayCoreVersion)
|
||||||
latestXrayCoreVersion);
|
{
|
||||||
|
requiredUpdate = true;
|
||||||
|
logger.LogInformation("发现新版本 Xray-Core (Version: {latestVersion}), 开始下载最新版本...",
|
||||||
|
latestXrayCoreVersion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (HttpRequestException e)
|
||||||
|
{
|
||||||
|
logger.LogError(e, "检查 Xray-Core 更新时发生错误, 跳过更新.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user