* Fix opensim region server shutdown.

0.6.0-stable
Justin Clarke Casey 2008-05-09 13:21:12 +00:00
parent b7baa3cd2a
commit 313a635d1e
6 changed files with 11 additions and 47 deletions

View File

@ -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);

View File

@ -178,7 +178,7 @@ namespace OpenSim.Grid.GridServer
*/
}
protected override void Shutdown()
public override void Shutdown()
{
foreach (IGridPlugin plugin in m_plugins) plugin.Close();

View File

@ -142,7 +142,7 @@ namespace OpenSim.Grid.MessagingServer
}
}
protected override void Shutdown()
public override void Shutdown()
{
msgsvc.deregisterWithUserServer();

View File

@ -244,7 +244,7 @@ namespace OpenSim.Grid.UserServer
}
}
protected override void Shutdown()
public override void Shutdown()
{
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;

View File

@ -330,19 +330,13 @@ 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();
}
/// <summary>
/// Print the version information available to the library. This include a subversion number if the root
/// .svn/entries file is present.
@ -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>

View File

@ -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")