fixing out-of-sync error in BaseHttpServer

0.6.5-rc1
Dr Scofield 2009-03-10 15:51:17 +00:00
parent 0df0258087
commit c6415ef71d
1 changed files with 19 additions and 16 deletions

View File

@ -499,6 +499,8 @@ namespace OpenSim.Framework.Servers
{ {
string bestMatch = null; string bestMatch = null;
lock (m_streamHandlers)
{
foreach (string pattern in m_streamHandlers.Keys) foreach (string pattern in m_streamHandlers.Keys)
{ {
if (handlerKey.StartsWith(pattern)) if (handlerKey.StartsWith(pattern))
@ -521,6 +523,7 @@ namespace OpenSim.Framework.Servers
return true; return true;
} }
} }
}
private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler) private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler)
{ {
@ -1482,7 +1485,7 @@ namespace OpenSim.Framework.Servers
//m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey);
m_streamHandlers.Remove(handlerKey); lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey);
} }
public void RemoveHTTPHandler(string httpMethod, string path) public void RemoveHTTPHandler(string httpMethod, string path)