on get asset with callback, do the callback even if asset not found. This is needed on same cases
parent
4b326f8691
commit
d2e380e81e
|
@ -347,13 +347,11 @@ namespace OpenSim.Services.Connectors
|
|||
string uri = r.uri;
|
||||
string id = r.id;
|
||||
|
||||
bool success = false;
|
||||
try
|
||||
{
|
||||
AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30000, m_Auth);
|
||||
if (a != null)
|
||||
{
|
||||
if (m_Cache != null)
|
||||
|
||||
if (a != null && m_Cache != null)
|
||||
m_Cache.Cache(a);
|
||||
|
||||
List<AssetRetrievedEx> handlers;
|
||||
|
@ -375,23 +373,8 @@ namespace OpenSim.Services.Connectors
|
|||
handlers.Clear();
|
||||
});
|
||||
}
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
List<AssetRetrievedEx> handlers;
|
||||
lock (m_AssetHandlers)
|
||||
{
|
||||
handlers = m_AssetHandlers[id];
|
||||
m_AssetHandlers.Remove(id);
|
||||
}
|
||||
if (handlers != null)
|
||||
handlers.Clear();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue