diff options
| author | JPVenson <github@jpb.software> | 2025-02-21 11:00:01 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.software> | 2025-02-21 11:00:01 +0000 |
| commit | a05b3be1b3234102e4225aed57f24a598fd8edf1 (patch) | |
| tree | 491e205526d24840a73a57fcd1870700e40da15f /Jellyfin.Server/Program.cs | |
| parent | 41c27d4e7e197308f3ff978c59e538028bbf4ef4 (diff) | |
Fixed nullability on startupService
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 922a06802..8523639e7 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -45,7 +45,7 @@ namespace Jellyfin.Server public const string LoggingConfigFileSystem = "logging.json"; private static readonly SerilogLoggerFactory _loggerFactory = new SerilogLoggerFactory(); - private static SetupServer? _setupServer = new(); + private static SetupServer _setupServer = new(); private static CoreAppHost? _appHost; private static IHost? _jfHost = null; private static long _startTimestamp; @@ -74,7 +74,7 @@ namespace Jellyfin.Server { _startTimestamp = Stopwatch.GetTimestamp(); ServerApplicationPaths appPaths = StartupHelpers.CreateApplicationPaths(options); - await _setupServer!.RunAsync(static () => _jfHost?.Services?.GetService<INetworkManager>(), appPaths, static () => _appHost).ConfigureAwait(false); + await _setupServer.RunAsync(static () => _jfHost?.Services?.GetService<INetworkManager>(), appPaths, static () => _appHost).ConfigureAwait(false); // $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager Environment.SetEnvironmentVariable("JELLYFIN_LOG_DIR", appPaths.LogDirectoryPath); @@ -169,7 +169,7 @@ namespace Jellyfin.Server try { - await _setupServer!.StopAsync().ConfigureAwait(false); + await _setupServer.StopAsync().ConfigureAwait(false); _setupServer.Dispose(); _setupServer = null!; await _jfHost.StartAsync().ConfigureAwait(false); |
