fix: Inacessible code due to wrong comparison operation

This commit is contained in:
Alexandr Stelnykovych 2024-04-10 14:35:11 +03:00
parent 6090518124
commit 76c8425452

View file

@ -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)