fix null ref on m_CacheCleanTimer control, add a gc.collect on manual floatsam fcache assets comand

melanie
UbitUmarov 2016-11-30 09:22:47 +00:00
parent f2cad38b3d
commit 2020cafc30
1 changed files with 4 additions and 2 deletions

View File

@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Asset
m_Scenes.Remove(scene); m_Scenes.Remove(scene);
lock(timerLock) lock(timerLock)
{ {
if(m_Scenes.Count <= 0) if(m_Running && m_Scenes.Count <= 0)
{ {
m_Running = false; m_Running = false;
m_CacheCleanTimer.Stop(); m_CacheCleanTimer.Stop();
@ -250,8 +250,8 @@ namespace OpenSim.Region.CoreModules.Asset
m_CacheCleanTimer.AutoReset = false; m_CacheCleanTimer.AutoReset = false;
m_CacheCleanTimer.Elapsed += CleanupExpiredFiles; m_CacheCleanTimer.Elapsed += CleanupExpiredFiles;
m_CacheCleanTimer.Start(); m_CacheCleanTimer.Start();
m_Running = true;
} }
m_Running = true;
} }
} }
} }
@ -834,6 +834,7 @@ namespace OpenSim.Region.CoreModules.Asset
if (File.Exists(filename)) if (File.Exists(filename))
{ {
UpdateFileLastAccessTime(filename); UpdateFileLastAccessTime(filename);
assetsFound[assetID] = true;
} }
else if (storeUncached) else if (storeUncached)
{ {
@ -1034,6 +1035,7 @@ namespace OpenSim.Region.CoreModules.Asset
} }
} }
int assetReferenceTotal = TouchAllSceneAssets(true); int assetReferenceTotal = TouchAllSceneAssets(true);
GC.Collect();
lock(timerLock) lock(timerLock)
{ {
if(wasRunning) if(wasRunning)