From f60092b4ea5138ec2e762fd4aad042471de8f9cf Mon Sep 17 00:00:00 2001 From: LamGC Date: Sun, 16 Mar 2025 22:12:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BD=93=E5=85=B7=E6=9C=89=E5=B7=B2?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=20Xray=20=E6=A0=B8=E5=BF=83?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=97=B6,=20=E5=8D=B3=E4=BD=BF=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=A4=B1=E8=B4=A5=E4=B9=9F=E4=B8=8D=E4=BC=9A=E7=BB=88?= =?UTF-8?q?=E6=AD=A2=E7=A8=8B=E5=BA=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Proxd-man/XrayCoreManager.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Proxd-man/XrayCoreManager.cs b/Proxd-man/XrayCoreManager.cs index 3a670fc..0c0306c 100644 --- a/Proxd-man/XrayCoreManager.cs +++ b/Proxd-man/XrayCoreManager.cs @@ -279,8 +279,19 @@ public class XrayCoreManager( if (requiredUpdate) { - await FetchXrayCoreProgram(); - logger.LogInformation("Xray-Core 更新完成."); + try + { + await FetchXrayCoreProgram(); + logger.LogInformation("Xray-Core 更新完成."); + } + catch (Exception e) + { + logger.LogError(e, "更新 Xray-Core 时发生错误."); + if (currentVersion == null) + { + throw; + } + } } else {