aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs32
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs25
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs23
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs6
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs9
5 files changed, 63 insertions, 32 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index b9ac155..14e21a2 100644..100755
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -230,25 +230,25 @@ namespace OpenSim.Framework.Servers.HttpServer
230 PollServiceHttpRequest req; 230 PollServiceHttpRequest req;
231 while (m_running) 231 while (m_running)
232 { 232 {
233 req = null; 233 try
234 if(!m_requests.TryTake(out req, 4500) || req == null)
235 { 234 {
236 Watchdog.UpdateThread(); 235 req = null;
237 continue; 236 if (!m_requests.TryTake(out req, 4500) || req == null)
238 } 237 {
238 Watchdog.UpdateThread();
239 continue;
240 }
239 241
240 Watchdog.UpdateThread(); 242 Watchdog.UpdateThread();
241 243
242 try 244 if (!req.HttpContext.CanSend())
243 {
244 if(!req.HttpContext.CanSend())
245 { 245 {
246 req.PollServiceArgs.Drop(req.RequestID, req.PollServiceArgs.Id); 246 req.PollServiceArgs.Drop(req.RequestID, req.PollServiceArgs.Id);
247 byContextDequeue(req); 247 byContextDequeue(req);
248 continue; 248 continue;
249 } 249 }
250 250
251 if(req.HttpContext.IsSending()) 251 if (req.HttpContext.IsSending())
252 { 252 {
253 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) 253 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms)
254 { 254 {
@@ -256,7 +256,7 @@ namespace OpenSim.Framework.Servers.HttpServer
256 byContextDequeue(req); 256 byContextDequeue(req);
257 } 257 }
258 else 258 else
259 ReQueueEvent(req); 259 ReQueueEvent(req);
260 continue; 260 continue;
261 } 261 }
262 262
@@ -290,7 +290,7 @@ namespace OpenSim.Framework.Servers.HttpServer
290 { 290 {
291 nreq.DoHTTPGruntWork(nreq.PollServiceArgs.NoEvents(nreq.RequestID, nreq.PollServiceArgs.Id)); 291 nreq.DoHTTPGruntWork(nreq.PollServiceArgs.NoEvents(nreq.RequestID, nreq.PollServiceArgs.Id));
292 } 292 }
293 catch (ObjectDisposedException) {} 293 catch (ObjectDisposedException) { }
294 finally 294 finally
295 { 295 {
296 byContextDequeue(nreq); 296 byContextDequeue(nreq);
@@ -305,6 +305,12 @@ namespace OpenSim.Framework.Servers.HttpServer
305 } 305 }
306 } 306 }
307 } 307 }
308 catch (ThreadAbortException)
309 {
310 Thread.ResetAbort();
311 // Shouldn't set this to 'false', the normal shutdown should cause things to exit
312 // m_running = false;
313 }
308 catch (Exception e) 314 catch (Exception e)
309 { 315 {
310 m_log.ErrorFormat("Exception in poll service thread: " + e.ToString()); 316 m_log.ErrorFormat("Exception in poll service thread: " + e.ToString());
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs
index 9187979..734425b 100644..100755
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs
@@ -204,19 +204,26 @@ namespace OpenSim.Region.ClientStack.Linden
204 204
205 private static void DoAssetRequests() 205 private static void DoAssetRequests()
206 { 206 {
207 while (m_NumberScenes > 0) 207 try
208 { 208 {
209 APollRequest poolreq; 209 while (m_NumberScenes > 0)
210 if(m_queue.TryTake(out poolreq, 4500))
211 { 210 {
212 if (m_NumberScenes <= 0) 211 APollRequest poolreq;
213 break; 212 if (m_queue.TryTake(out poolreq, 4500))
213 {
214 if (m_NumberScenes <= 0)
215 break;
216 Watchdog.UpdateThread();
217 if (poolreq.reqID != UUID.Zero)
218 poolreq.thepoll.Process(poolreq);
219 poolreq = null;
220 }
214 Watchdog.UpdateThread(); 221 Watchdog.UpdateThread();
215 if (poolreq.reqID != UUID.Zero)
216 poolreq.thepoll.Process(poolreq);
217 poolreq = null;
218 } 222 }
219 Watchdog.UpdateThread(); 223 }
224 catch (ThreadAbortException)
225 {
226 Thread.ResetAbort();
220 } 227 }
221 } 228 }
222 229
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 41d70a3..9a01567 100644..100755
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -395,17 +395,26 @@ namespace OpenSim.Region.ClientStack.Linden
395 395
396 private static void DoInventoryRequests() 396 private static void DoInventoryRequests()
397 { 397 {
398 while (true) 398 bool running = true;
399 while (running)
399 { 400 {
400 APollRequest poolreq; 401 try
401 if (m_queue.TryTake(out poolreq, 4500))
402 { 402 {
403 APollRequest poolreq;
404 if (m_queue.TryTake(out poolreq, 4500))
405 {
406 Watchdog.UpdateThread();
407 if (poolreq.thepoll != null)
408 poolreq.thepoll.Process(poolreq);
409 poolreq = null;
410 }
403 Watchdog.UpdateThread(); 411 Watchdog.UpdateThread();
404 if (poolreq.thepoll != null)
405 poolreq.thepoll.Process(poolreq);
406 poolreq = null;
407 } 412 }
408 Watchdog.UpdateThread(); 413 catch (ThreadAbortException)
414 {
415 Thread.ResetAbort();
416 running = false;
417 }
409 } 418 }
410 } 419 }
411 } 420 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index f12b3b9..653f648 100644..100755
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1910,7 +1910,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1910 incomingPacket = null; 1910 incomingPacket = null;
1911 } 1911 }
1912 } 1912 }
1913 catch(Exception ex) 1913 catch (ThreadAbortException)
1914 {
1915 Thread.ResetAbort();
1916 }
1917 catch (Exception ex)
1914 { 1918 {
1915 m_log.Error("[LLUDPSERVER]: Error in the incoming packet handler loop: " + ex.Message, ex); 1919 m_log.Error("[LLUDPSERVER]: Error in the incoming packet handler loop: " + ex.Message, ex);
1916 } 1920 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 3120d04..a6a2dd8 100644..100755
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -221,7 +221,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
221 /// </summary> 221 /// </summary>
222 private static void CmdHandlerThreadLoop() 222 private static void CmdHandlerThreadLoop()
223 { 223 {
224 while (true) 224 bool running = true;
225 while (running)
225 { 226 {
226 try 227 try
227 { 228 {
@@ -230,7 +231,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
230 DoOneCmdHandlerPass(); 231 DoOneCmdHandlerPass();
231 Watchdog.UpdateThread(); 232 Watchdog.UpdateThread();
232 } 233 }
233 catch ( System.Threading.ThreadAbortException) { } 234 catch ( System.Threading.ThreadAbortException)
235 {
236 Thread.ResetAbort();
237 running = false;
238 }
234 catch (Exception e) 239 catch (Exception e)
235 { 240 {
236 m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e); 241 m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e);