Drop some unnecessary ContainsKey() checking before Remove() in BaseHttpServer()

Remove() presumably does this check anyway since it just returns false if the key is not in the collection.
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-10-24 23:26:41 +01:00
parent 9ec672c70b
commit e14cb45b9b
1 changed files with 2 additions and 12 deletions

View File

@ -1814,12 +1814,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemovePollServiceHTTPHandler(string httpMethod, string path)
{
lock (m_pollHandlers)
{
if (m_pollHandlers.ContainsKey(path))
{
m_pollHandlers.Remove(path);
}
}
m_pollHandlers.Remove(path);
RemoveHTTPHandler(httpMethod, path);
}
@ -1843,12 +1838,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveXmlRPCHandler(string method)
{
lock (m_rpcHandlers)
{
if (m_rpcHandlers.ContainsKey(method))
{
m_rpcHandlers.Remove(method);
}
}
m_rpcHandlers.Remove(method);
}
public bool RemoveLLSDHandler(string path, LLSDMethod handler)