From 9ea2219df7673222220fa7925d98aa77f30800ca Mon Sep 17 00:00:00 2001 From: omgbeez <251408589+omgbeez@users.noreply.github.com> Date: Tue, 28 Apr 2026 14:30:10 -0400 Subject: [PATCH] fix(service): Clear SQLite connection pools on service stop Should fix manual delete of Regression tests which create a temp SQLite DB for their tests. --- server/RdtClient.Service/BackgroundServices/Startup.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/RdtClient.Service/BackgroundServices/Startup.cs b/server/RdtClient.Service/BackgroundServices/Startup.cs index 36dbaf2..648242f 100644 --- a/server/RdtClient.Service/BackgroundServices/Startup.cs +++ b/server/RdtClient.Service/BackgroundServices/Startup.cs @@ -1,4 +1,5 @@ using System.Reflection; +using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -39,6 +40,9 @@ public class Startup(IServiceProvider serviceProvider) : IHostedService public Task StopAsync(CancellationToken cancellationToken) { + Ready = false; + SqliteConnection.ClearAllPools(); + return Task.CompletedTask; } }