From 2020cafc308a99555412324a4de33958593a255a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 30 Nov 2016 09:22:47 +0000 Subject: [PATCH] fix null ref on m_CacheCleanTimer control, add a gc.collect on manual floatsam fcache assets comand --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 025d3cefa1..9413598de6 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Asset m_Scenes.Remove(scene); lock(timerLock) { - if(m_Scenes.Count <= 0) + if(m_Running && m_Scenes.Count <= 0) { m_Running = false; m_CacheCleanTimer.Stop(); @@ -250,8 +250,8 @@ namespace OpenSim.Region.CoreModules.Asset m_CacheCleanTimer.AutoReset = false; m_CacheCleanTimer.Elapsed += CleanupExpiredFiles; m_CacheCleanTimer.Start(); + m_Running = true; } - m_Running = true; } } } @@ -834,6 +834,7 @@ namespace OpenSim.Region.CoreModules.Asset if (File.Exists(filename)) { UpdateFileLastAccessTime(filename); + assetsFound[assetID] = true; } else if (storeUncached) { @@ -1034,6 +1035,7 @@ namespace OpenSim.Region.CoreModules.Asset } } int assetReferenceTotal = TouchAllSceneAssets(true); + GC.Collect(); lock(timerLock) { if(wasRunning)