Skip to content

Commit

Permalink
Replace or remove SetServiceStatus calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtn committed Mar 29, 2020
1 parent 74d1a54 commit e37c641
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 @@ -360,7 +360,6 @@ private void StopIt()
Log.Debug("WaitForProcessToExit " + _process.Id + "+" + stopProcess.Id);
WaitForProcessToExit(_process);
WaitForProcessToExit(stopProcess);
SignalShutdownComplete();
}

// Stop extensions
Expand Down Expand Up @@ -422,12 +421,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 e37c641

Please sign in to comment.