From 29dbc95254ba5e0db3c293dcc0e08827dd09f870 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 24 May 2016 14:17:12 -0400 Subject: [PATCH 1/2] 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) { From 813db187422fc7597a8bf7a877d8fcba14975d03 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 24 May 2016 14:20:39 -0400 Subject: [PATCH 2/2] update startup error handling --- .../BaseApplicationHost.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index 6a92533ed..a76ab9f07 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -252,15 +252,7 @@ namespace MediaBrowser.Common.Implementations var innerProgress = new ActionableProgress(); innerProgress.RegisterAction(p => progress.Report(.8 * p + 15)); - try - { - await RegisterResources(innerProgress).ConfigureAwait(false); - } - catch (Exception ex) - { - Logger.ErrorException("Error in RegisterResource", ex); - throw; - } + await RegisterResources(innerProgress).ConfigureAwait(false); FindParts(); progress.Report(95);