Skip to content

Commit 0c85021

Browse files
committed
fixed servicecontroller timespan to 1 hours
1 parent 7ae8e1b commit 0c85021

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ private static void Activation()
377377
if (sc.Status == ServiceControllerStatus.Running)
378378
{
379379
sc.Stop();
380-
sc.WaitForStatus(ServiceControllerStatus.Stopped, new(0, 1, 0));
380+
sc.WaitForStatus(ServiceControllerStatus.Stopped, new(1, 0, 0));
381381
Console.WriteLine("正在停止服务");
382382
}
383383
sc.Close();
@@ -423,7 +423,7 @@ private static void Activation()
423423
if (sc.Status == ServiceControllerStatus.Stopped)
424424
{
425425
sc.Start();
426-
sc.WaitForStatus(ServiceControllerStatus.Running,new(0,1,0));
426+
sc.WaitForStatus(ServiceControllerStatus.Running,new(1,0,0));
427427
Console.WriteLine("正在启动服务");
428428
}
429429
sc.Close();

0 commit comments

Comments
 (0)