diff options
| author | Fernando Fernández <ferferga@hotmail.com> | 2021-05-24 10:48:01 +0200 |
|---|---|---|
| committer | Fernando Fernández <ferferga@hotmail.com> | 2021-05-24 10:48:01 +0200 |
| commit | 6db229af5deb6a00035ddcfebc4fd9db3b6a5336 (patch) | |
| tree | 3647bb422d51e95434184ee29b209c7f1ee6e591 /Jellyfin.Server/Program.cs | |
| parent | 3b822116ed8b89da82d5b90cd0fdca070def6377 (diff) | |
Address review comments
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 d0f10b467..3a3d7415b 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -222,15 +222,15 @@ namespace Jellyfin.Server } finally { - appHost.Dispose(); _logger.LogInformation("Running query planner optimizations in the database... This might take a while"); - - // Run after disposing the application + // Run before disposing the application using var context = new JellyfinDbProvider(appHost.ServiceProvider, appPaths).CreateContext(); if (context.Database.IsSqlite()) { context.Database.ExecuteSqlRaw("PRAGMA optimize"); } + + appHost.Dispose(); } if (_restartOnShutdown) |
