aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs')
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 127ca1d..7054825 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -83,7 +83,7 @@ namespace Flotsam.RegionModules.AssetCache
83 private Dictionary<string, ManualResetEvent> m_CurrentlyWriting = new Dictionary<string, ManualResetEvent>(); 83 private Dictionary<string, ManualResetEvent> m_CurrentlyWriting = new Dictionary<string, ManualResetEvent>();
84 private int m_WaitOnInprogressTimeout = 3000; 84 private int m_WaitOnInprogressTimeout = 3000;
85#else 85#else
86 private List<string> m_CurrentlyWriting = new List<string>(); 86 private HashSet<string> m_CurrentlyWriting = new HashSet<string>();
87#endif 87#endif
88 88
89 private bool m_FileCacheEnabled = true; 89 private bool m_FileCacheEnabled = true;
@@ -272,7 +272,11 @@ namespace Flotsam.RegionModules.AssetCache
272 // the other thread has updated the time for us. 272 // the other thread has updated the time for us.
273 try 273 try
274 { 274 {
275 File.SetLastAccessTime(filename, DateTime.Now); 275 lock (m_CurrentlyWriting)
276 {
277 if (!m_CurrentlyWriting.Contains(filename))
278 File.SetLastAccessTime(filename, DateTime.Now);
279 }
276 } 280 }
277 catch 281 catch
278 { 282 {