diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 10 | ||||
-rw-r--r-- | OpenSim/Server/Base/ServicesServerBase.cs | 3 | ||||
-rw-r--r-- | OpenSim/Server/ServerMain.cs | 6 |
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; | |||
31 | using System; | 31 | using System; |
32 | using System.Net; | 32 | using System.Net; |
33 | using System.Collections.Generic; | 33 | using System.Collections.Generic; |
34 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
35 | using OpenSim.Framework.Servers.HttpServer; | 36 | using OpenSim.Framework.Servers.HttpServer; |
36 | using OpenSim.Server.Base; | 37 | using 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; |