diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 897ee4f..473a01c 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -1853,21 +1853,16 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1853 | 1853 | ||
1854 | public bool RemoveLLSDHandler(string path, LLSDMethod handler) | 1854 | public bool RemoveLLSDHandler(string path, LLSDMethod handler) |
1855 | { | 1855 | { |
1856 | try | 1856 | lock (m_llsdHandlers) |
1857 | { | 1857 | { |
1858 | lock (m_llsdHandlers) | 1858 | LLSDMethod foundHandler; |
1859 | |||
1860 | if (m_llsdHandlers.TryGetValue(path, out foundHandler) && foundHandler == handler) | ||
1859 | { | 1861 | { |
1860 | if (handler == m_llsdHandlers[path]) | 1862 | m_llsdHandlers.Remove(path); |
1861 | { | 1863 | return true; |
1862 | m_llsdHandlers.Remove(path); | ||
1863 | return true; | ||
1864 | } | ||
1865 | } | 1864 | } |
1866 | } | 1865 | } |
1867 | catch (KeyNotFoundException) | ||
1868 | { | ||
1869 | // This is an exception to prevent crashing because of invalid code | ||
1870 | } | ||
1871 | 1866 | ||
1872 | return false; | 1867 | return false; |
1873 | } | 1868 | } |