Skip to content

Commit

Permalink
Revert "ExitCode cast fix Topshelf#477"
Browse files Browse the repository at this point in the history
This reverts commit 7ac1cdc.
  • Loading branch information
BlythMeister authored and phatboyg committed Jan 12, 2019
1 parent 9893f23 commit 7e32fc0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Topshelf/Runtime/Windows/WindowsServiceHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,7 @@ public TopshelfExitCode Run()

Run(this);

// this error code does not matter when running as a windows service
// the actual exit code is taken from the ServiceBase.ExitCode
// Windows service tooling already sees the service as stopped here -
// once ServiceBase.OnStop method exits, but the process is not yet finished here.
// even if we put Thread.Sleep(600000) the process will be killed after some timeout
return new TopshelfExitCode(ExitCode);
return (TopshelfExitCode) Enum.ToObject(typeof(TopshelfExitCode), ExitCode);
}

void HostControl.RequestAdditionalTime(TimeSpan timeRemaining)
Expand Down

0 comments on commit 7e32fc0

Please sign in to comment.