From 29dbc95254ba5e0db3c293dcc0e08827dd09f870 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 24 May 2016 14:17:12 -0400 Subject: [PATCH] update startup error handling --- MediaBrowser.ServerApplication/MainStartup.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 706e9c8ed..3a3b10188 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -244,7 +244,9 @@ namespace MediaBrowser.ServerApplication var task = _appHost.Init(initProgress); - task = task.ContinueWith(new Action(a => _appHost.RunStartupTasks())); + Task.WaitAll(task); + + task = task.ContinueWith(new Action(a => _appHost.RunStartupTasks()), TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.AttachedToParent); if (runService) {