Stop also adding an ordinary http handler when we set up a poll http handler.

It appears that this is entirely unnecessary since the poll http handlers are dealt with on a separate code path.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-07 12:28:42 +00:00
parent 8e542cfa03
commit e6272b8d56
5 changed files with 13 additions and 36 deletions

View File

@@ -227,21 +227,17 @@ namespace OpenSim.Framework.Servers.HttpServer
return new List<string>(m_HTTPHandlers.Keys);
}
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args)
{
bool pollHandlerResult = false;
lock (m_pollHandlers)
{
if (!m_pollHandlers.ContainsKey(methodName))
{
m_pollHandlers.Add(methodName,args);
pollHandlerResult = true;
m_pollHandlers.Add(methodName, args);
return true;
}
}
if (pollHandlerResult)
return AddHTTPHandler(methodName, handler);
return false;
}
@@ -1848,8 +1844,6 @@ namespace OpenSim.Framework.Servers.HttpServer
{
lock (m_pollHandlers)
m_pollHandlers.Remove(path);
RemoveHTTPHandler(httpMethod, path);
}
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)