aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-05-23 03:26:32 +0100
committerUbitUmarov2017-05-23 03:26:32 +0100
commit928733efc908e25ea460ca4724a8846a4fb71fa1 (patch)
treeb6714acf2088da56367ef3a11acf85fe48873bbe
parent no all mono versions know DnsRefreshTimeout (diff)
downloadopensim-SC_OLD-928733efc908e25ea460ca4724a8846a4fb71fa1.zip
opensim-SC_OLD-928733efc908e25ea460ca4724a8846a4fb71fa1.tar.gz
opensim-SC_OLD-928733efc908e25ea460ca4724a8846a4fb71fa1.tar.bz2
opensim-SC_OLD-928733efc908e25ea460ca4724a8846a4fb71fa1.tar.xz
please DIE! PLEASE??
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs9
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs11
-rw-r--r--OpenSim/Framework/Servers/MainServer.cs12
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs1
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs9
-rwxr-xr-xOpenSim/Region/ScriptEngine/XEngine/XEngine.cs3
7 files changed, 40 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 62cd543..99d94bb 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -108,12 +108,17 @@ namespace OpenSim.Framework.Servers
108 108
109 protected override void ShutdownSpecific() 109 protected override void ShutdownSpecific()
110 { 110 {
111 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
112 111
113 RemovePIDFile();
114 112
115 base.ShutdownSpecific(); 113 base.ShutdownSpecific();
116 114
115 MainServer.Stop();
116
117 Thread.Sleep(5000);
118
119 RemovePIDFile();
120 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
121
117 if (!SuppressExit) 122 if (!SuppressExit)
118 Environment.Exit(0); 123 Environment.Exit(0);
119 } 124 }
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 8bf98da..e1bd564 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -181,17 +181,20 @@ namespace OpenSim.Framework.Servers.HttpServer
181 { 181 {
182 m_running = false; 182 m_running = false;
183 183
184 Thread.Sleep(1000); // let the world move 184 Thread.Sleep(100); // let the world move
185 185
186 foreach (Thread t in m_workerThreads) 186 foreach (Thread t in m_workerThreads)
187 Watchdog.AbortThread(t.ManagedThreadId); 187 Watchdog.AbortThread(t.ManagedThreadId);
188 188
189 m_threadPool.Shutdown();
190
189 // any entry in m_bycontext should have a active request on the other queues 191 // any entry in m_bycontext should have a active request on the other queues
190 // so just delete contents to easy GC 192 // so just delete contents to easy GC
191 foreach (Queue<PollServiceHttpRequest> qu in m_bycontext.Values) 193 foreach (Queue<PollServiceHttpRequest> qu in m_bycontext.Values)
192 qu.Clear(); 194 qu.Clear();
193 m_bycontext.Clear(); 195 m_bycontext.Clear();
194 196
197/*
195 try 198 try
196 { 199 {
197 foreach (PollServiceHttpRequest req in m_retryRequests) 200 foreach (PollServiceHttpRequest req in m_retryRequests)
@@ -204,8 +207,9 @@ namespace OpenSim.Framework.Servers.HttpServer
204 } 207 }
205 208
206 PollServiceHttpRequest wreq; 209 PollServiceHttpRequest wreq;
210*/
207 m_retryRequests.Clear(); 211 m_retryRequests.Clear();
208 212/*
209 while (m_requests.Count() > 0) 213 while (m_requests.Count() > 0)
210 { 214 {
211 try 215 try
@@ -218,7 +222,7 @@ namespace OpenSim.Framework.Servers.HttpServer
218 { 222 {
219 } 223 }
220 } 224 }
221 225*/
222 m_requests.Clear(); 226 m_requests.Clear();
223 } 227 }
224 228
@@ -229,7 +233,6 @@ namespace OpenSim.Framework.Servers.HttpServer
229 while (m_running) 233 while (m_running)
230 { 234 {
231 PollServiceHttpRequest req = m_requests.Dequeue(5000); 235 PollServiceHttpRequest req = m_requests.Dequeue(5000);
232
233 Watchdog.UpdateThread(); 236 Watchdog.UpdateThread();
234 if (req != null) 237 if (req != null)
235 { 238 {
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index ea7b2b5..9b1d906 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -353,5 +353,17 @@ namespace OpenSim.Framework.Servers
353 return m_Servers[port]; 353 return m_Servers[port];
354 } 354 }
355 } 355 }
356
357 public static void Stop()
358 {
359 lock (m_Servers)
360 {
361 foreach (BaseHttpServer httpServer in m_Servers.Values)
362 {
363 httpServer.Stop();
364 }
365 }
366 }
367
356 } 368 }
357} \ No newline at end of file 369} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
index 5d66d34..8c44ee2 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -106,6 +106,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid
106 if (!m_Enabled) 106 if (!m_Enabled)
107 return; 107 return;
108 108
109 base.RemoveRegion(scene);
110
109 scene.EventManager.OnClientClosed -= EventManager_OnClientClosed; 111 scene.EventManager.OnClientClosed -= EventManager_OnClientClosed;
110 } 112 }
111 113
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index dabff60..57dc556 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -415,6 +415,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
415 415
416 public void Close() 416 public void Close()
417 { 417 {
418 ThreadPool.Shutdown();
418 } 419 }
419 420
420 public string Name 421 public string Name
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 5dcf326..00c8279 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -215,6 +215,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
215 m_scene.EventManager.OnNewClient -= OnNewClient; 215 m_scene.EventManager.OnNewClient -= OnNewClient;
216 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; 216 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
217 217
218 m_scene.UnregisterModuleInterface<IWorldMapModule>(this);
219
218 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); 220 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
219 regionimage = regionimage.Replace("-", ""); 221 regionimage = regionimage.Replace("-", "");
220 MainServer.Instance.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), 222 MainServer.Instance.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(),
@@ -1148,7 +1150,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1148 List<MapBlockRequestData> thisRunData = new List<MapBlockRequestData>(); 1150 List<MapBlockRequestData> thisRunData = new List<MapBlockRequestData>();
1149 while (true) 1151 while (true)
1150 { 1152 {
1151 m_mapBlockRequestEvent.WaitOne(); 1153 while(!m_mapBlockRequestEvent.WaitOne(4900))
1154 {
1155 if(m_scene == null)
1156 return;
1157 }
1158
1152 lock (m_mapBlockRequestEvent) 1159 lock (m_mapBlockRequestEvent)
1153 { 1160 {
1154 int total = 0; 1161 int total = 0;
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 0ccc683..2e39033 100755
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -827,6 +827,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
827 if (m_ScriptEngines.Contains(this)) 827 if (m_ScriptEngines.Contains(this))
828 m_ScriptEngines.Remove(this); 828 m_ScriptEngines.Remove(this);
829 } 829 }
830
831 lock(m_Scripts)
832 m_ThreadPool.Shutdown();
830 } 833 }
831 834
832 public object DoBackup(object o) 835 public object DoBackup(object o)