diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 2069c0e15c..af25ef4016 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Servers
///
/// Should be overriden by descendents if they need to perform extra shutdown processing
///
- protected virtual void Shutdown()
+ public virtual void Shutdown()
{
m_console.Close();
Environment.Exit(0);
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs
index 49c53e9726..5517953fc8 100644
--- a/OpenSim/Grid/GridServer/GridServerBase.cs
+++ b/OpenSim/Grid/GridServer/GridServerBase.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Grid.GridServer
*/
}
- protected override void Shutdown()
+ public override void Shutdown()
{
foreach (IGridPlugin plugin in m_plugins) plugin.Close();
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index 22a7d9c6da..9020ca4a84 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Grid.MessagingServer
}
}
- protected override void Shutdown()
+ public override void Shutdown()
{
msgsvc.deregisterWithUserServer();
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index b6f59e15c6..e1ccd020b0 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -244,7 +244,7 @@ namespace OpenSim.Grid.UserServer
}
}
- protected override void Shutdown()
+ public override void Shutdown()
{
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index adfddcb284..ec26d9d65e 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -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);
}
- ///
- /// Signal that the end of the world is now.
- ///
- public void ApocalypseNow()
- {
- WorldHasComeToAnEnd.Set();
- }
-
///
/// 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
///
/// Performs any last-minute sanity checking and shuts down the region server
///
- 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();
}
///
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs
index c02095cc5e..f33441ff09 100644
--- a/OpenSim/Region/Application/OpenSimMainConsole.cs
+++ b/OpenSim/Region/Application/OpenSimMainConsole.cs
@@ -120,32 +120,6 @@ namespace OpenSim
return new ConsoleBase("Region", this);
}
- ///
- /// Performs any last-minute sanity checking and shuts down the region server
- ///
- 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")