From a352c053abeb5e79c5ca0d8a6032d39b58c6be7f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 20 Nov 2022 19:09:29 -0800 Subject: [PATCH] Fixed: Publish ApplicationStartingEvent during startup (cherry picked from commit 5400bce1295bdc4198d2cfe0b9258bbb7ccf0852) Fixes #1199 --- src/NzbDrone.Host/Startup.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Host/Startup.cs b/src/NzbDrone.Host/Startup.cs index 44db1e7c7..b8461c581 100644 --- a/src/NzbDrone.Host/Startup.cs +++ b/src/NzbDrone.Host/Startup.cs @@ -19,6 +19,8 @@ using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; using NzbDrone.Core.Datastore; using NzbDrone.Core.Instrumentation; +using NzbDrone.Core.Lifecycle; +using NzbDrone.Core.Messaging.Events; using NzbDrone.Host.AccessControl; using NzbDrone.Http.Authentication; using NzbDrone.SignalR; @@ -215,6 +217,7 @@ namespace NzbDrone.Host IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, + IEventAggregator eventAggregator, ProwlarrErrorPipeline errorHandler) { initializeLogger.Initialize(); @@ -236,6 +239,8 @@ namespace NzbDrone.Host Console.CancelKeyPress += (sender, eventArgs) => NLog.LogManager.Configuration = null; } + eventAggregator.PublishEvent(new ApplicationStartingEvent()); + if (OsInfo.IsWindows && runtimeInfo.IsAdmin) { firewallAdapter.MakeAccessible();