From 14ed17741d10f43ad0c89d8bc59f42be81602f6c Mon Sep 17 00:00:00 2001 From: sshcomm Date: Tue, 21 Jan 2025 20:39:03 +0330 Subject: [PATCH] Update CoreHandler.cs --- v2rayN/ServiceLib/Handler/CoreHandler.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/Handler/CoreHandler.cs b/v2rayN/ServiceLib/Handler/CoreHandler.cs index 44215204..83914239 100644 --- a/v2rayN/ServiceLib/Handler/CoreHandler.cs +++ b/v2rayN/ServiceLib/Handler/CoreHandler.cs @@ -1,4 +1,4 @@ -using System.Diagnostics; +using System.Diagnostics; using System.Text; namespace ServiceLib.Handler @@ -82,7 +82,12 @@ namespace ServiceLib.Handler UpdateFunc(false, $"{Utils.GetRuntimeInfo()}"); UpdateFunc(false, string.Format(ResUI.StartService, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"))); await CoreStop(); - await Task.Delay(100); + // if (_config.TunModeItem.EnableTun) + // { + await Task.Delay(1000); + Utils.RemoveTunDevice(); + // } + await Task.Delay(1000); await CoreStart(node); await CoreStartPreService(node); if (_process != null) @@ -368,4 +373,4 @@ namespace ServiceLib.Handler #endregion Linux } -} \ No newline at end of file +}