Skip to content

Commit

Permalink
Add metrics collector to disposable parts (jellyfin#11539)
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero committed May 12, 2024
1 parent efba619 commit c190735
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Emby.Server.Implementations/ApplicationHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public void Init(IServiceCollection serviceCollection)
// Initialize runtime stat collection
if (ConfigurationManager.Configuration.EnableMetrics)
{
DotNetRuntimeStatsBuilder.Default().StartCollecting();
_disposableParts.Add(DotNetRuntimeStatsBuilder.Default().StartCollecting());
}

var networkConfiguration = ConfigurationManager.GetNetworkConfiguration();
Expand Down
1 change: 1 addition & 0 deletions Jellyfin.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ private static async Task StartServer(IServerApplicationPaths appPaths, StartupO
}
catch (Exception ex)
{
_restartOnShutdown = false;
_logger.LogCritical(ex, "Error while starting server");
}
finally
Expand Down

0 comments on commit c190735

Please sign in to comment.