* Fix opensim region server shutdown.
parent
b7baa3cd2a
commit
313a635d1e
|
@ -52,7 +52,7 @@ namespace OpenSim.Framework.Servers
|
|||
/// <summary>
|
||||
/// Should be overriden by descendents if they need to perform extra shutdown processing
|
||||
/// </summary>
|
||||
protected virtual void Shutdown()
|
||||
public virtual void Shutdown()
|
||||
{
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace OpenSim.Grid.GridServer
|
|||
*/
|
||||
}
|
||||
|
||||
protected override void Shutdown()
|
||||
public override void Shutdown()
|
||||
{
|
||||
foreach (IGridPlugin plugin in m_plugins) plugin.Close();
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
}
|
||||
}
|
||||
|
||||
protected override void Shutdown()
|
||||
public override void Shutdown()
|
||||
{
|
||||
msgsvc.deregisterWithUserServer();
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ namespace OpenSim.Grid.UserServer
|
|||
}
|
||||
}
|
||||
|
||||
protected override void Shutdown()
|
||||
public override void Shutdown()
|
||||
{
|
||||
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
||||
|
||||
|
|
|
@ -330,17 +330,11 @@ namespace OpenSim
|
|||
// We are done with startup
|
||||
m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
|
||||
m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
|
||||
|
||||
WorldHasComeToAnEnd.WaitOne();
|
||||
m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signal that the end of the world is now.
|
||||
/// </summary>
|
||||
public void ApocalypseNow()
|
||||
{
|
||||
WorldHasComeToAnEnd.Set();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -689,7 +683,7 @@ namespace OpenSim
|
|||
/// <summary>
|
||||
/// Performs any last-minute sanity checking and shuts down the region server
|
||||
/// </summary>
|
||||
protected virtual void InternalShutdown()
|
||||
public override void Shutdown()
|
||||
{
|
||||
if (proxyUrl.Length > 0)
|
||||
{
|
||||
|
@ -703,14 +697,10 @@ namespace OpenSim
|
|||
m_log.Info("[SHUTDOWN]: Closing console and terminating");
|
||||
|
||||
m_sceneManager.Close();
|
||||
// needs to be called by Shutdown() method
|
||||
// Environment.Exit(0);
|
||||
}
|
||||
|
||||
public virtual void Shutdown()
|
||||
{
|
||||
InternalShutdown();
|
||||
ApocalypseNow();
|
||||
WorldHasComeToAnEnd.Set();
|
||||
|
||||
base.Shutdown();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -120,32 +120,6 @@ namespace OpenSim
|
|||
return new ConsoleBase("Region", this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs any last-minute sanity checking and shuts down the region server
|
||||
/// </summary>
|
||||
public override void Shutdown()
|
||||
{
|
||||
if (m_startupCommandsFile != String.Empty)
|
||||
{
|
||||
RunCommandScript(m_shutdownCommandsFile);
|
||||
}
|
||||
|
||||
if (proxyUrl.Length > 0)
|
||||
{
|
||||
Util.XmlRpcCommand(proxyUrl, "Stop");
|
||||
}
|
||||
|
||||
m_log.Info("[SHUTDOWN]: Closing all threads");
|
||||
m_log.Info("[SHUTDOWN]: Killing listener thread");
|
||||
m_log.Info("[SHUTDOWN]: Killing clients");
|
||||
// TODO: implement this
|
||||
m_log.Info("[SHUTDOWN]: Closing console and terminating");
|
||||
|
||||
m_sceneManager.Close();
|
||||
|
||||
base.Shutdown();
|
||||
}
|
||||
|
||||
private void RunAutoTimerScript(object sender, EventArgs e)
|
||||
{
|
||||
if (m_timedScript != "disabled")
|
||||
|
|
Loading…
Reference in New Issue