aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs24
-rw-r--r--OpenSim/Region/Application/OpenSimMainConsole.cs26
2 files changed, 7 insertions, 43 deletions
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
330 // We are done with startup 330 // We are done with startup
331 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", 331 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
332 m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); 332 m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
333
333 WorldHasComeToAnEnd.WaitOne(); 334 WorldHasComeToAnEnd.WaitOne();
334 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye."); 335 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
336
335 Environment.Exit(0); 337 Environment.Exit(0);
336 } 338 }
337 339
338 /// <summary> 340 /// <summary>
339 /// Signal that the end of the world is now.
340 /// </summary>
341 public void ApocalypseNow()
342 {
343 WorldHasComeToAnEnd.Set();
344 }
345
346 /// <summary>
347 /// Print the version information available to the library. This include a subversion number if the root 341 /// Print the version information available to the library. This include a subversion number if the root
348 /// .svn/entries file is present. 342 /// .svn/entries file is present.
349 /// </summary> 343 /// </summary>
@@ -689,7 +683,7 @@ namespace OpenSim
689 /// <summary> 683 /// <summary>
690 /// Performs any last-minute sanity checking and shuts down the region server 684 /// Performs any last-minute sanity checking and shuts down the region server
691 /// </summary> 685 /// </summary>
692 protected virtual void InternalShutdown() 686 public override void Shutdown()
693 { 687 {
694 if (proxyUrl.Length > 0) 688 if (proxyUrl.Length > 0)
695 { 689 {
@@ -703,14 +697,10 @@ namespace OpenSim
703 m_log.Info("[SHUTDOWN]: Closing console and terminating"); 697 m_log.Info("[SHUTDOWN]: Closing console and terminating");
704 698
705 m_sceneManager.Close(); 699 m_sceneManager.Close();
706 // needs to be called by Shutdown() method 700
707 // Environment.Exit(0); 701 WorldHasComeToAnEnd.Set();
708 } 702
709 703 base.Shutdown();
710 public virtual void Shutdown()
711 {
712 InternalShutdown();
713 ApocalypseNow();
714 } 704 }
715 705
716 /// <summary> 706 /// <summary>
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs
index c02095c..f33441f 100644
--- a/OpenSim/Region/Application/OpenSimMainConsole.cs
+++ b/OpenSim/Region/Application/OpenSimMainConsole.cs
@@ -120,32 +120,6 @@ namespace OpenSim
120 return new ConsoleBase("Region", this); 120 return new ConsoleBase("Region", this);
121 } 121 }
122 122
123 /// <summary>
124 /// Performs any last-minute sanity checking and shuts down the region server
125 /// </summary>
126 public override void Shutdown()
127 {
128 if (m_startupCommandsFile != String.Empty)
129 {
130 RunCommandScript(m_shutdownCommandsFile);
131 }
132
133 if (proxyUrl.Length > 0)
134 {
135 Util.XmlRpcCommand(proxyUrl, "Stop");
136 }
137
138 m_log.Info("[SHUTDOWN]: Closing all threads");
139 m_log.Info("[SHUTDOWN]: Killing listener thread");
140 m_log.Info("[SHUTDOWN]: Killing clients");
141 // TODO: implement this
142 m_log.Info("[SHUTDOWN]: Closing console and terminating");
143
144 m_sceneManager.Close();
145
146 base.Shutdown();
147 }
148
149 private void RunAutoTimerScript(object sender, EventArgs e) 123 private void RunAutoTimerScript(object sender, EventArgs e)
150 { 124 {
151 if (m_timedScript != "disabled") 125 if (m_timedScript != "disabled")