aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-24 23:26:41 +0100
committerJustin Clark-Casey (justincc)2011-10-24 23:26:41 +0100
commite14cb45b9bc4c78300cb804833cb66c1c2e62187 (patch)
tree581fd7f4a66c0d64bc22e922d43975eaa5e164f8 /OpenSim/Framework/Servers/HttpServer
parentFix bugs in EventQueueGetModule.ClientClosed() and BaseHttpServer.RemovePollS... (diff)
downloadopensim-SC_OLD-e14cb45b9bc4c78300cb804833cb66c1c2e62187.zip
opensim-SC_OLD-e14cb45b9bc4c78300cb804833cb66c1c2e62187.tar.gz
opensim-SC_OLD-e14cb45b9bc4c78300cb804833cb66c1c2e62187.tar.bz2
opensim-SC_OLD-e14cb45b9bc4c78300cb804833cb66c1c2e62187.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs14
1 files changed, 2 insertions, 12 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 7ec813f..3aed9a8 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1814,12 +1814,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1814 public void RemovePollServiceHTTPHandler(string httpMethod, string path) 1814 public void RemovePollServiceHTTPHandler(string httpMethod, string path)
1815 { 1815 {
1816 lock (m_pollHandlers) 1816 lock (m_pollHandlers)
1817 { 1817 m_pollHandlers.Remove(path);
1818 if (m_pollHandlers.ContainsKey(path))
1819 {
1820 m_pollHandlers.Remove(path);
1821 }
1822 }
1823 1818
1824 RemoveHTTPHandler(httpMethod, path); 1819 RemoveHTTPHandler(httpMethod, path);
1825 } 1820 }
@@ -1843,12 +1838,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1843 public void RemoveXmlRPCHandler(string method) 1838 public void RemoveXmlRPCHandler(string method)
1844 { 1839 {
1845 lock (m_rpcHandlers) 1840 lock (m_rpcHandlers)
1846 { 1841 m_rpcHandlers.Remove(method);
1847 if (m_rpcHandlers.ContainsKey(method))
1848 {
1849 m_rpcHandlers.Remove(method);
1850 }
1851 }
1852 } 1842 }
1853 1843
1854 public bool RemoveLLSDHandler(string path, LLSDMethod handler) 1844 public bool RemoveLLSDHandler(string path, LLSDMethod handler)