mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-21 00:05:26 +03:00
Do not save a reference to the startup config in ApplicationHost
This commit is contained in:
@@ -103,10 +103,10 @@ namespace Jellyfin.Server
|
||||
|
||||
// Create an instance of the application configuration to use for application startup
|
||||
await InitLoggingConfigFile(appPaths).ConfigureAwait(false);
|
||||
IConfiguration appConfig = CreateAppConfiguration(appPaths);
|
||||
IConfiguration startupConfig = CreateAppConfiguration(appPaths);
|
||||
|
||||
// Initialize logging framework
|
||||
InitializeLoggingFramework(appConfig, appPaths);
|
||||
InitializeLoggingFramework(startupConfig, appPaths);
|
||||
_logger = _loggerFactory.CreateLogger("Main");
|
||||
|
||||
// Log uncaught exceptions to the logging instead of std error
|
||||
@@ -171,12 +171,11 @@ namespace Jellyfin.Server
|
||||
options,
|
||||
new ManagedFileSystem(_loggerFactory.CreateLogger<ManagedFileSystem>(), appPaths),
|
||||
GetImageEncoder(appPaths),
|
||||
new NetworkManager(_loggerFactory.CreateLogger<NetworkManager>()),
|
||||
appConfig);
|
||||
new NetworkManager(_loggerFactory.CreateLogger<NetworkManager>()));
|
||||
try
|
||||
{
|
||||
ServiceCollection serviceCollection = new ServiceCollection();
|
||||
await appHost.InitAsync(serviceCollection).ConfigureAwait(false);
|
||||
await appHost.InitAsync(serviceCollection, startupConfig).ConfigureAwait(false);
|
||||
|
||||
var webHost = CreateWebHostBuilder(appHost, serviceCollection, appPaths).Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user