From ee098e019451cc3da11465e18f6b464598ebd64d Mon Sep 17 00:00:00 2001 From: JohnBlair Date: Thu, 17 Oct 2019 19:06:28 +0100 Subject: [PATCH] Make sure the local dbs are disposed of if the content store was not created. --- .../PublishedCache/NuCache/PublishedSnapshotService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 81a3aa9e21..e08a0e3c52 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -144,8 +144,11 @@ namespace Umbraco.Web.PublishedCache.NuCache lock (_storesLock) { _contentStore?.ReleaseLocalDb(); //null check because we could shut down before being assigned + // Make sure the local dbs are disposed of if the content store was not created. + _localContentDb?.Dispose(); _localContentDb = null; _mediaStore?.ReleaseLocalDb(); //null check because we could shut down before being assigned + _localMediaDb?.Dispose(); _localMediaDb = null; }