diff options
author | Justin Clark-Casey (justincc) | 2011-08-22 01:58:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-22 01:58:50 +0100 |
commit | 5a11cffd2303a80dfa644c831bdf6cce3a932e7d (patch) | |
tree | 8ae6f3c5f018d39963f6f5fe58f558db33d8ada0 /OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |
parent | remove necessity to catch a KeyNotFoundException in BaseHttpServer.RemoveLLSD... (diff) | |
download | opensim-SC_OLD-5a11cffd2303a80dfa644c831bdf6cce3a932e7d.zip opensim-SC_OLD-5a11cffd2303a80dfa644c831bdf6cce3a932e7d.tar.gz opensim-SC_OLD-5a11cffd2303a80dfa644c831bdf6cce3a932e7d.tar.bz2 opensim-SC_OLD-5a11cffd2303a80dfa644c831bdf6cce3a932e7d.tar.xz |
improve locking of m_streamHandlers in BaseHttpServer
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 6 |
1 files changed, 4 insertions, 2 deletions
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 | |||
155 | 155 | ||
156 | public List<string> GetStreamHandlerKeys() | 156 | public List<string> GetStreamHandlerKeys() |
157 | { | 157 | { |
158 | return new List<string>(m_streamHandlers.Keys); | 158 | lock (m_streamHandlers) |
159 | return new List<string>(m_streamHandlers.Keys); | ||
159 | } | 160 | } |
160 | 161 | ||
161 | private static string GetHandlerKey(string httpMethod, string path) | 162 | private static string GetHandlerKey(string httpMethod, string path) |
@@ -1793,7 +1794,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1793 | 1794 | ||
1794 | //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); | 1795 | //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); |
1795 | 1796 | ||
1796 | lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey); | 1797 | lock (m_streamHandlers) |
1798 | m_streamHandlers.Remove(handlerKey); | ||
1797 | } | 1799 | } |
1798 | 1800 | ||
1799 | public void RemoveHTTPHandler(string httpMethod, string path) | 1801 | public void RemoveHTTPHandler(string httpMethod, string path) |