Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service start timeout too short #116

Open
hiramwu opened this issue Nov 24, 2018 · 1 comment
Open

service start timeout too short #116

hiramwu opened this issue Nov 24, 2018 · 1 comment

Comments

@hiramwu
Copy link

hiramwu commented Nov 24, 2018

private static void StopService(HostConfiguration config, ServiceController sc)
{
if (!(sc.Status == ServiceControllerStatus.Stopped | sc.Status == ServiceControllerStatus.StopPending))
{
sc.Stop();
sc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromMilliseconds(1000));
Console.WriteLine($@"Successfully stopped service ""{config.Name}"" (""{config.Description}"")");
config.OnServiceStop?.Invoke(config.Service);
}
else
{
Console.WriteLine($@"Service ""{config.Name}"" (""{config.Description}"") is already stopped or stop is pending.");
}
}

In this Method, the service start timeout only set to one second, it's too short to start service

@PeterKottas
Copy link
Owner

Thanks for spotting the mistake. Feel free to contribute a PR, I am happy to accept that but not doing active development on this at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants