From 313a635d1ec368b14a1678bdf7813138972f3bbc Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 9 May 2008 13:21:12 +0000 Subject: * Fix opensim region server shutdown. --- OpenSim/Region/Application/OpenSimMain.cs | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimMain.cs') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index adfddcb..ec26d9d 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -330,20 +330,14 @@ 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(); } /// -- cgit v1.1