From 41d2345405b517632f5268dca451c692e4031cae Mon Sep 17 00:00:00 2001 From: dbuechel Date: Tue, 27 Aug 2019 11:12:31 +0200 Subject: [PATCH] SEBWIN-301, SEBWIN-322: Increased timeout of status changes for service feature configurations. It appears like Windows Update occasionally needs more than 5 seconds to stop. --- .../ServiceConfigurations/ServiceConfiguration.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs index 5cbc312f..683d117d 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs @@ -18,7 +18,7 @@ namespace SafeExamBrowser.Lockdown.FeatureConfigurations.ServiceConfigurations [Serializable] internal abstract class ServiceConfiguration : FeatureConfiguration { - private static readonly TimeSpan FIVE_SECONDS = TimeSpan.FromSeconds(5); + private static readonly TimeSpan TEN_SECONDS = TimeSpan.FromSeconds(10); private IList originalItems; protected abstract IEnumerable Items { get; } @@ -201,7 +201,7 @@ namespace SafeExamBrowser.Lockdown.FeatureConfigurations.ServiceConfigurations if (service.Status == ServiceControllerStatus.PausePending) { - service.WaitForStatus(ServiceControllerStatus.Paused, FIVE_SECONDS); + service.WaitForStatus(ServiceControllerStatus.Paused, TEN_SECONDS); service.Refresh(); } @@ -219,7 +219,7 @@ namespace SafeExamBrowser.Lockdown.FeatureConfigurations.ServiceConfigurations if (service.Status == ServiceControllerStatus.StartPending || service.Status == ServiceControllerStatus.ContinuePending) { - service.WaitForStatus(ServiceControllerStatus.Running, FIVE_SECONDS); + service.WaitForStatus(ServiceControllerStatus.Running, TEN_SECONDS); service.Refresh(); } @@ -243,7 +243,7 @@ namespace SafeExamBrowser.Lockdown.FeatureConfigurations.ServiceConfigurations if (service.Status == ServiceControllerStatus.StartPending || service.Status == ServiceControllerStatus.ContinuePending) { - service.WaitForStatus(ServiceControllerStatus.Running, FIVE_SECONDS); + service.WaitForStatus(ServiceControllerStatus.Running, TEN_SECONDS); service.Refresh(); } @@ -255,7 +255,7 @@ namespace SafeExamBrowser.Lockdown.FeatureConfigurations.ServiceConfigurations if (service.Status == ServiceControllerStatus.StopPending) { - service.WaitForStatus(ServiceControllerStatus.Stopped, FIVE_SECONDS); + service.WaitForStatus(ServiceControllerStatus.Stopped, TEN_SECONDS); service.Refresh(); }