add some locks to GetTextureModule

avinationmerge
UbitUmarov 2012-09-17 22:35:36 +01:00
parent c1eec3b828
commit fd20ef5c91
1 changed files with 13 additions and 10 deletions

View File

@ -149,13 +149,16 @@ namespace OpenSim.Region.ClientStack.Linden
HasEvents = (x, y) => { return this.responses.ContainsKey(x); }; HasEvents = (x, y) => { return this.responses.ContainsKey(x); };
GetEvents = (x, y, s) => GetEvents = (x, y, s) =>
{ {
try lock (responses)
{ {
return this.responses[x]; try
} {
finally return this.responses[x];
{ }
responses.Remove(x); finally
{
responses.Remove(x);
}
} }
}; };
@ -218,14 +221,14 @@ namespace OpenSim.Region.ClientStack.Linden
response["content_type"] = "text/plain"; response["content_type"] = "text/plain";
response["keepalive"] = false; response["keepalive"] = false;
response["reusecontext"] = false; response["reusecontext"] = false;
lock (responses)
responses[requestID] = response; responses[requestID] = response;
return; return;
} }
response = m_getTextureHandler.Handle(request); response = m_getTextureHandler.Handle(request);
lock (responses)
responses[requestID] = response; responses[requestID] = response;
} }
} }