Skip to content

Commit

Permalink
fixed servicecontroller timespan to 1 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
MIAIONE committed May 9, 2022
1 parent 7ae8e1b commit 0c85021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ private static void Activation()
if (sc.Status == ServiceControllerStatus.Running)
{
sc.Stop();
sc.WaitForStatus(ServiceControllerStatus.Stopped, new(0, 1, 0));
sc.WaitForStatus(ServiceControllerStatus.Stopped, new(1, 0, 0));
Console.WriteLine("正在停止服务");
}
sc.Close();
Expand Down Expand Up @@ -423,7 +423,7 @@ private static void Activation()
if (sc.Status == ServiceControllerStatus.Stopped)
{
sc.Start();
sc.WaitForStatus(ServiceControllerStatus.Running,new(0,1,0));
sc.WaitForStatus(ServiceControllerStatus.Running,new(1,0,0));
Console.WriteLine("正在启动服务");
}
sc.Close();
Expand Down

0 comments on commit 0c85021

Please sign in to comment.