We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c70d53 commit 9e37732Copy full SHA for 9e37732
src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs
@@ -678,6 +678,17 @@ public void StartService(string serviceName)
678
if (service != null)
679
{
680
service.Start();
681
+
682
+ try
683
+ {
684
+ _term.WriteLine("Waiting for service to start...");
685
+ service.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(60));
686
+ }
687
+ catch (System.ServiceProcess.TimeoutException)
688
689
+ throw new InvalidOperationException($"Cannot start the service {serviceName} in a timely fashion.");
690
691
692
_term.WriteLine($"Service {serviceName} started successfully");
693
}
694
else
0 commit comments