please DIE! PLEASE??
parent
7b80bcc57a
commit
928733efc9
|
@ -108,12 +108,17 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
protected override void ShutdownSpecific()
|
||||
{
|
||||
m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
|
||||
|
||||
RemovePIDFile();
|
||||
|
||||
base.ShutdownSpecific();
|
||||
|
||||
MainServer.Stop();
|
||||
|
||||
Thread.Sleep(5000);
|
||||
|
||||
RemovePIDFile();
|
||||
m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
|
||||
|
||||
if (!SuppressExit)
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
|
|
@ -181,17 +181,20 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
{
|
||||
m_running = false;
|
||||
|
||||
Thread.Sleep(1000); // let the world move
|
||||
Thread.Sleep(100); // let the world move
|
||||
|
||||
foreach (Thread t in m_workerThreads)
|
||||
Watchdog.AbortThread(t.ManagedThreadId);
|
||||
|
||||
m_threadPool.Shutdown();
|
||||
|
||||
// any entry in m_bycontext should have a active request on the other queues
|
||||
// so just delete contents to easy GC
|
||||
foreach (Queue<PollServiceHttpRequest> qu in m_bycontext.Values)
|
||||
qu.Clear();
|
||||
m_bycontext.Clear();
|
||||
|
||||
/*
|
||||
try
|
||||
{
|
||||
foreach (PollServiceHttpRequest req in m_retryRequests)
|
||||
|
@ -204,8 +207,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
|
||||
PollServiceHttpRequest wreq;
|
||||
*/
|
||||
m_retryRequests.Clear();
|
||||
|
||||
/*
|
||||
while (m_requests.Count() > 0)
|
||||
{
|
||||
try
|
||||
|
@ -218,7 +222,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
m_requests.Clear();
|
||||
}
|
||||
|
||||
|
@ -229,7 +233,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
while (m_running)
|
||||
{
|
||||
PollServiceHttpRequest req = m_requests.Dequeue(5000);
|
||||
|
||||
Watchdog.UpdateThread();
|
||||
if (req != null)
|
||||
{
|
||||
|
|
|
@ -353,5 +353,17 @@ namespace OpenSim.Framework.Servers
|
|||
return m_Servers[port];
|
||||
}
|
||||
}
|
||||
|
||||
public static void Stop()
|
||||
{
|
||||
lock (m_Servers)
|
||||
{
|
||||
foreach (BaseHttpServer httpServer in m_Servers.Values)
|
||||
{
|
||||
httpServer.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -106,6 +106,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
|||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
base.RemoveRegion(scene);
|
||||
|
||||
scene.EventManager.OnClientClosed -= EventManager_OnClientClosed;
|
||||
}
|
||||
|
||||
|
|
|
@ -415,6 +415,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
|
||||
public void Close()
|
||||
{
|
||||
ThreadPool.Shutdown();
|
||||
}
|
||||
|
||||
public string Name
|
||||
|
|
|
@ -215,6 +215,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
m_scene.EventManager.OnNewClient -= OnNewClient;
|
||||
m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
|
||||
|
||||
m_scene.UnregisterModuleInterface<IWorldMapModule>(this);
|
||||
|
||||
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
||||
regionimage = regionimage.Replace("-", "");
|
||||
MainServer.Instance.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(),
|
||||
|
@ -1148,7 +1150,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
List<MapBlockRequestData> thisRunData = new List<MapBlockRequestData>();
|
||||
while (true)
|
||||
{
|
||||
m_mapBlockRequestEvent.WaitOne();
|
||||
while(!m_mapBlockRequestEvent.WaitOne(4900))
|
||||
{
|
||||
if(m_scene == null)
|
||||
return;
|
||||
}
|
||||
|
||||
lock (m_mapBlockRequestEvent)
|
||||
{
|
||||
int total = 0;
|
||||
|
|
|
@ -827,6 +827,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
if (m_ScriptEngines.Contains(this))
|
||||
m_ScriptEngines.Remove(this);
|
||||
}
|
||||
|
||||
lock(m_Scripts)
|
||||
m_ThreadPool.Shutdown();
|
||||
}
|
||||
|
||||
public object DoBackup(object o)
|
||||
|
|
Loading…
Reference in New Issue