aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs37
1 files changed, 21 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 88a3026..4b502b7 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -301,25 +301,30 @@ namespace OpenSim.Services.Connectors
301 bool success = false; 301 bool success = false;
302 try 302 try
303 { 303 {
304 AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 304 AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30);
305 delegate(AssetBase a) 305 if (a != null)
306 { 306 {
307 if (m_Cache != null) 307 if (m_Cache != null)
308 m_Cache.Cache(a); 308 m_Cache.Cache(a);
309 309
310 List<AssetRetrievedEx> handlers; 310 List<AssetRetrievedEx> handlers;
311 lock (m_AssetHandlers) 311 lock (m_AssetHandlers)
312 {
313 handlers = m_AssetHandlers[id];
314 m_AssetHandlers.Remove(id);
315 }
316 foreach (AssetRetrievedEx h in handlers)
317 {
318 Util.FireAndForget(x =>
312 { 319 {
313 handlers = m_AssetHandlers[id];
314 m_AssetHandlers.Remove(id);
315 }
316 foreach (AssetRetrievedEx h in handlers)
317 h.Invoke(a); 320 h.Invoke(a);
318 if (handlers != null) 321 });
319 handlers.Clear(); 322 }
320 }, m_maxAssetRequestConcurrency); 323 if (handlers != null)
324 handlers.Clear();
321 325
322 success = true; 326 success = true;
327 }
323 } 328 }
324 finally 329 finally
325 { 330 {
@@ -332,7 +337,7 @@ namespace OpenSim.Services.Connectors
332 m_AssetHandlers.Remove(id); 337 m_AssetHandlers.Remove(id);
333 } 338 }
334 if (handlers != null) 339 if (handlers != null)
335 handlers.Clear(); 340 handlers.Clear();
336 } 341 }
337 } 342 }
338 } 343 }