aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/AssetCache.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetCache.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 0d85345..0e31e95 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -44,8 +44,8 @@ namespace OpenSim.Framework.Communications.Cache
44 /// 44 ///
45 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either 45 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either
46 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and 46 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
47 /// sends packetised data directly back to the client. The only point where they meets is AssetReceived() and 47 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
48 /// AssetNotFound(). 48 /// AssetNotFound(), which means they do share the same asset and texture caches.
49 /// 49 ///
50 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age). 50 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age).
51 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets 51 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets
@@ -469,7 +469,7 @@ namespace OpenSim.Framework.Communications.Cache
469 469
470 // Notify requesters for this asset 470 // Notify requesters for this asset
471 if (RequestLists.ContainsKey(asset.FullID)) 471 if (RequestLists.ContainsKey(asset.FullID))
472 { 472 {
473 lock (RequestLists) 473 lock (RequestLists)
474 { 474 {
475 AssetRequestsList reqList = RequestLists[asset.FullID]; 475 AssetRequestsList reqList = RequestLists[asset.FullID];
@@ -513,14 +513,16 @@ namespace OpenSim.Framework.Communications.Cache
513 // Notify requesters for this asset 513 // Notify requesters for this asset
514 lock (RequestLists) 514 lock (RequestLists)
515 { 515 {
516 AssetRequestsList reqList = RequestLists[assetID]; 516 if (RequestLists.ContainsKey(assetID))
517 foreach (NewAssetRequest req in reqList.Requests)
518 { 517 {
519 req.Callback(assetID, null); 518 AssetRequestsList reqList = RequestLists[assetID];
519 foreach (NewAssetRequest req in reqList.Requests)
520 {
521 req.Callback(assetID, null);
522 }
523
524 RequestLists.Remove(assetID);
520 } 525 }
521
522 RequestLists.Remove(assetID);
523 reqList.Requests.Clear();
524 } 526 }
525 } 527 }
526 528