Merge branch 'master' into httptests

httptests
UbitUmarov 2016-11-03 17:19:02 +00:00
commit 0c39a3e348
1 changed files with 18 additions and 35 deletions

View File

@ -347,13 +347,11 @@ namespace OpenSim.Services.Connectors
string uri = r.uri; string uri = r.uri;
string id = r.id; string id = r.id;
bool success = false;
try try
{ {
AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30000, m_Auth); AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30000, m_Auth);
if (a != null)
{ if (a != null && m_Cache != null)
if (m_Cache != null)
m_Cache.Cache(a); m_Cache.Cache(a);
List<AssetRetrievedEx> handlers; List<AssetRetrievedEx> handlers;
@ -375,23 +373,8 @@ namespace OpenSim.Services.Connectors
handlers.Clear(); 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 { }
} }
} }