Fix threading in remote asset connector

avinationmerge
Melanie 2012-10-05 00:15:55 +02:00
parent efb9b7014e
commit d5ea203f93
1 changed files with 21 additions and 16 deletions

View File

@ -295,8 +295,8 @@ namespace OpenSim.Services.Connectors
bool success = false;
try
{
AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
delegate(AssetBase a)
AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30);
if (a != null)
{
if (m_Cache != null)
m_Cache.Cache(a);
@ -308,13 +308,18 @@ namespace OpenSim.Services.Connectors
m_AssetHandlers.Remove(id);
}
foreach (AssetRetrievedEx h in handlers)
{
Util.FireAndForget(x =>
{
h.Invoke(a);
});
}
if (handlers != null)
handlers.Clear();
}, 30);
success = true;
}
}
finally
{
if (!success)