From 76c8425452c9f573b2a277a65ef5d1272f9820ba Mon Sep 17 00:00:00 2001 From: Alexandr Stelnykovych Date: Wed, 10 Apr 2024 14:35:11 +0300 Subject: [PATCH] fix: Inacessible code due to wrong comparison operation --- service/firewall/interception/windowskext/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/firewall/interception/windowskext/service.go b/service/firewall/interception/windowskext/service.go index 420a4196..399407bb 100644 --- a/service/firewall/interception/windowskext/service.go +++ b/service/firewall/interception/windowskext/service.go @@ -104,7 +104,7 @@ func waitForServiceStatus(handle windows.Handle, neededStatus uint32, timeLimit var status windows.SERVICE_STATUS status.CurrentState = windows.SERVICE_NO_CHANGE start := time.Now() - for status.CurrentState == neededStatus { + for status.CurrentState != neededStatus { err := windows.QueryServiceStatus(handle, &status) if err != nil { return false, fmt.Errorf("failed while waiting for service to start: %w", err)