Make sure the local dbs are disposed of if the content store was not created.

This commit is contained in:
JohnBlair
2019-10-17 19:06:28 +01:00
committed by Shannon
parent e998fce5d1
commit ee098e0194

View File

@@ -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;
}