From fd20ef5c91f5db119d17b1974805b6d4fc2abad3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 17 Sep 2012 22:35:36 +0100 Subject: add some locks to GetTextureModule --- .../ClientStack/Linden/Caps/GetTextureModule.cs | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 5b125ea..0ac56ec 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -149,13 +149,16 @@ namespace OpenSim.Region.ClientStack.Linden HasEvents = (x, y) => { return this.responses.ContainsKey(x); }; GetEvents = (x, y, s) => { - try + lock (responses) { - return this.responses[x]; - } - finally - { - responses.Remove(x); + try + { + return this.responses[x]; + } + finally + { + responses.Remove(x); + } } }; @@ -218,14 +221,14 @@ namespace OpenSim.Region.ClientStack.Linden response["content_type"] = "text/plain"; response["keepalive"] = false; response["reusecontext"] = false; - - responses[requestID] = response; + lock (responses) + responses[requestID] = response; return; } response = m_getTextureHandler.Handle(request); - - responses[requestID] = response; + lock (responses) + responses[requestID] = response; } } -- cgit v1.1