aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-09-09 21:02:21 -0400
committerGitHub <noreply@github.com>2017-09-09 21:02:21 -0400
commit926d976e84b62fd939811221d92fca45c96c02de (patch)
treea51163df5efaf7ef611e62b53055b858e723ff22 /MediaBrowser.ServerApplication
parent75b6b713b08cc59a4c0772fcbfbe1ac1aebd65f9 (diff)
parenta46f81d5726204085e4d0a4b883d7bdd69de9b94 (diff)
Merge pull request #2874 from MediaBrowser/dev
3.2.30.13
Diffstat (limited to 'MediaBrowser.ServerApplication')
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index 27eb3e0e17..d17d9ee435 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -134,10 +134,17 @@ namespace MediaBrowser.ServerApplication
private static bool IsServiceInstalled()
{
- var serviceName = BackgroundService.GetExistingServiceName();
- var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == serviceName);
+ try
+ {
+ var serviceName = BackgroundService.GetExistingServiceName();
+ var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == serviceName);
- return ctl != null;
+ return ctl != null;
+ }
+ catch
+ {
+ return false;
+ }
}
/// <summary>