From 5a11cffd2303a80dfa644c831bdf6cce3a932e7d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 22 Aug 2011 01:58:50 +0100 Subject: improve locking of m_streamHandlers in BaseHttpServer --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Servers') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 473a01c..988d859 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -155,7 +155,8 @@ namespace OpenSim.Framework.Servers.HttpServer public List GetStreamHandlerKeys() { - return new List(m_streamHandlers.Keys); + lock (m_streamHandlers) + return new List(m_streamHandlers.Keys); } private static string GetHandlerKey(string httpMethod, string path) @@ -1793,7 +1794,8 @@ namespace OpenSim.Framework.Servers.HttpServer //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); - lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey); + lock (m_streamHandlers) + m_streamHandlers.Remove(handlerKey); } public void RemoveHTTPHandler(string httpMethod, string path) -- cgit v1.1