From 9548a3d03ab0f05f0dc00f3bbb426ab78229aed5 Mon Sep 17 00:00:00 2001 From: Amazing_DM Date: Sat, 4 Apr 2020 23:34:58 -0500 Subject: [PATCH] Update NFController.cs --- Netch/Controllers/NFController.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Netch/Controllers/NFController.cs b/Netch/Controllers/NFController.cs index 6ab887cc..1f2785fc 100644 --- a/Netch/Controllers/NFController.cs +++ b/Netch/Controllers/NFController.cs @@ -89,9 +89,10 @@ namespace Netch.Controllers if (service.Status == ServiceControllerStatus.Running) { //防止其他程序占用 重置NF百万ID限制 待定 - /*service.Stop(); + service.Stop(); + service.WaitForStatus(ServiceControllerStatus.Stopped) MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting netfilter2 Service")}"); - service.Start();*/ + service.Start(); } else if (service.Status == ServiceControllerStatus.Stopped) { @@ -343,4 +344,4 @@ namespace Netch.Controllers } } } -} \ No newline at end of file +}