aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-05-24 22:17:04 +0100
committerUbitUmarov2017-05-24 22:17:04 +0100
commitdca3a45803a18103113b9eb861da4f79572de924 (patch)
tree71b2dad54f62c9e0ff5e0df5383c2d7be5121520
parentmantis 8780 replace ode bins for linux with ones compiled against older Glibc... (diff)
downloadopensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.zip
opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.tar.gz
opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.tar.bz2
opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.tar.xz
add a bit more pre exit cleanup
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs8
-rw-r--r--OpenSim/Framework/Util.cs10
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs3
-rw-r--r--OpenSim/Server/ServerMain.cs6
4 files changed, 23 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 7d21e00..bc68681 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -108,16 +108,16 @@ namespace OpenSim.Framework.Servers
108 108
109 protected override void ShutdownSpecific() 109 protected override void ShutdownSpecific()
110 { 110 {
111 111 Watchdog.Enabled = false;
112
113 base.ShutdownSpecific(); 112 base.ShutdownSpecific();
114 113
115 MainServer.Stop(); 114 MainServer.Stop();
116 115
117 Thread.Sleep(5000); 116 Thread.Sleep(5000);
118 117 Util.StopThreadPool();
119 WorkManager.Stop(); 118 WorkManager.Stop();
120 119
120 Thread.Sleep(1000);
121 RemovePIDFile(); 121 RemovePIDFile();
122 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting..."); 122 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
123 123
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index f6ded04..3342df3 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -2852,6 +2852,16 @@ namespace OpenSim.Framework
2852 return stpi; 2852 return stpi;
2853 } 2853 }
2854 2854
2855 public static void StopThreadPool()
2856 {
2857 if (m_ThreadPool == null)
2858 return;
2859 SmartThreadPool pool = m_ThreadPool;
2860 m_ThreadPool = null;
2861
2862 try { pool.Shutdown(); } catch {}
2863 }
2864
2855 #endregion FireAndForget Threading Pattern 2865 #endregion FireAndForget Threading Pattern
2856 2866
2857 /// <summary> 2867 /// <summary>
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index 4951776..8db97a8 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -249,6 +249,9 @@ namespace OpenSim.Server.Base
249 } 249 }
250 } 250 }
251 251
252 MemoryWatchdog.Enabled = false;
253 Watchdog.Enabled = false;
254
252 RemovePIDFile(); 255 RemovePIDFile();
253 256
254 return 0; 257 return 0;
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index 341c227..accf938 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using System; 31using System;
32using System.Net; 32using System.Net;
33using System.Collections.Generic; 33using System.Collections.Generic;
34using OpenSim.Framework;
34using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
35using OpenSim.Framework.Servers.HttpServer; 36using OpenSim.Framework.Servers.HttpServer;
36using OpenSim.Server.Base; 37using OpenSim.Server.Base;
@@ -161,6 +162,11 @@ namespace OpenSim.Server
161 162
162 int res = m_Server.Run(); 163 int res = m_Server.Run();
163 164
165 if(m_Server != null)
166 m_Server.Shutdown();
167
168 Util.StopThreadPool();
169
164 Environment.Exit(res); 170 Environment.Exit(res);
165 171
166 return 0; 172 return 0;