aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers')
-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
3 files changed, 26 insertions, 6 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