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);
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)