* Another attempt at fixing the random spurious test error.

* This time it might be the listening socket thread from HttpServer aborting with a non blocking thread abort exception.   Hopefully calling Stop() on MainServer.Instance will solve that.
This commit is contained in:
Teravus Ovares (Dan Olivares)
2009-08-26 21:05:46 -04:00
parent b7041d7adf
commit 6f077d5e5f
6 changed files with 58 additions and 8 deletions

View File

@@ -1637,13 +1637,20 @@ namespace OpenSim.Framework.Servers.HttpServer
public void Stop()
{
HTTPDRunning = false;
m_httpListener2.ExceptionThrown -= httpServerException;
//m_httpListener2.DisconnectHandler = null;
m_httpListener2.LogWriter = null;
m_httpListener2.RequestReceived -= OnRequest;
try
{
m_httpListener2.ExceptionThrown -= httpServerException;
//m_httpListener2.DisconnectHandler = null;
m_httpListener2.Stop();
m_httpListener2.LogWriter = null;
m_httpListener2.RequestReceived -= OnRequest;
m_httpListener2.Stop();
}
catch (NullReferenceException)
{
m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer.");
}
}
public void RemoveStreamHandler(string httpMethod, string path)