Merge branch 'avination' into careminster
Conflicts: OpenSim/Services/Connectors/Asset/AssetServicesConnector.csavinationmerge
commit
0c5b36a4f7
|
@ -301,25 +301,30 @@ namespace OpenSim.Services.Connectors
|
||||||
bool success = false;
|
bool success = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
|
AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30);
|
||||||
delegate(AssetBase a)
|
if (a != null)
|
||||||
{
|
{
|
||||||
if (m_Cache != null)
|
if (m_Cache != null)
|
||||||
m_Cache.Cache(a);
|
m_Cache.Cache(a);
|
||||||
|
|
||||||
List<AssetRetrievedEx> handlers;
|
List<AssetRetrievedEx> handlers;
|
||||||
lock (m_AssetHandlers)
|
lock (m_AssetHandlers)
|
||||||
|
{
|
||||||
|
handlers = m_AssetHandlers[id];
|
||||||
|
m_AssetHandlers.Remove(id);
|
||||||
|
}
|
||||||
|
foreach (AssetRetrievedEx h in handlers)
|
||||||
|
{
|
||||||
|
Util.FireAndForget(x =>
|
||||||
{
|
{
|
||||||
handlers = m_AssetHandlers[id];
|
|
||||||
m_AssetHandlers.Remove(id);
|
|
||||||
}
|
|
||||||
foreach (AssetRetrievedEx h in handlers)
|
|
||||||
h.Invoke(a);
|
h.Invoke(a);
|
||||||
if (handlers != null)
|
});
|
||||||
handlers.Clear();
|
}
|
||||||
}, m_maxAssetRequestConcurrency);
|
if (handlers != null)
|
||||||
|
handlers.Clear();
|
||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -332,7 +337,7 @@ namespace OpenSim.Services.Connectors
|
||||||
m_AssetHandlers.Remove(id);
|
m_AssetHandlers.Remove(id);
|
||||||
}
|
}
|
||||||
if (handlers != null)
|
if (handlers != null)
|
||||||
handlers.Clear();
|
handlers.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue