From adf38f256b402e1fd8f57cc6a415b881dd96e5c6 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 14 May 2022 10:05:25 -0500 Subject: [PATCH] Clean lingering Postgres Connections on Close --- src/NzbDrone.Host/Bootstrap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index 4b3717c11..42b434cef 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -9,13 +9,12 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using DryIoc; using DryIoc.Microsoft.DependencyInjection; -using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting.WindowsServices; using NLog; +using Npgsql; using NzbDrone.Common.Composition.Extensions; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Exceptions; @@ -105,6 +104,7 @@ namespace NzbDrone.Host GC.Collect(); GC.WaitForPendingFinalizers(); SQLiteConnection.ClearAllPools(); + NpgsqlConnection.ClearAllPools(); } public static IHostBuilder CreateConsoleHostBuilder(string[] args, StartupContext context)