diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 6add7e0b3..c394b25bd 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -422,7 +422,7 @@ namespace Emby.Server.Implementations // Initialize runtime stat collection if (ConfigurationManager.Configuration.EnableMetrics) { - DotNetRuntimeStatsBuilder.Default().StartCollecting(); + _disposableParts.Add(DotNetRuntimeStatsBuilder.Default().StartCollecting()); } var networkConfiguration = ConfigurationManager.GetNetworkConfiguration(); diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index fd7696906..295fb8112 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -185,6 +185,7 @@ namespace Jellyfin.Server } catch (Exception ex) { + _restartOnShutdown = false; _logger.LogCritical(ex, "Error while starting server"); } finally