Skip to content

Commit

Permalink
Merge pull request winsw#417 from NextTurn/setstatus
Browse files Browse the repository at this point in the history
Fix `<waithint>` setting
  • Loading branch information
oleg-nenashev authored May 10, 2020
2 parents 3ca7066 + e37c641 commit f4c5f82
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Core/ServiceWrapper/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ private void StopIt()
Log.Debug("WaitForProcessToExit " + _process.Id + "+" + stopProcess.Id);
WaitForProcessToExit(_process);
WaitForProcessToExit(stopProcess);
SignalShutdownComplete();
}

// Stop extensions
Expand Down Expand Up @@ -429,12 +428,7 @@ private void SignalShutdownPending()
effectiveWaitHint = (int)_descriptor.WaitHint.TotalMilliseconds;
}

IntPtr handle = ServiceHandle;
_wrapperServiceStatus.checkPoint++;
_wrapperServiceStatus.waitHint = effectiveWaitHint;
// WriteEvent("SignalShutdownPending " + wrapperServiceStatus.checkPoint + ":" + wrapperServiceStatus.waitHint);
_wrapperServiceStatus.currentState = (int)State.SERVICE_STOP_PENDING;
Advapi32.SetServiceStatus(handle, _wrapperServiceStatus);
RequestAdditionalTime(effectiveWaitHint);
}

private void SignalShutdownComplete()
Expand Down

0 comments on commit f4c5f82

Please sign in to comment.