aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorRobert Adams2019-02-27 07:49:52 -0800
committerRobert Adams2019-02-27 07:49:52 -0800
commitbd1b992aaf57154fd57403348a1ab63bfd918ad9 (patch)
tree45c627049706614e14de445e9dab2dcc9b072b9a /OpenSim/Region/ClientStack/Linden
parent combat module: those parcel changes are now handled elsewhere (diff)
downloadopensim-SC-bd1b992aaf57154fd57403348a1ab63bfd918ad9.zip
opensim-SC-bd1b992aaf57154fd57403348a1ab63bfd918ad9.tar.gz
opensim-SC-bd1b992aaf57154fd57403348a1ab63bfd918ad9.tar.bz2
opensim-SC-bd1b992aaf57154fd57403348a1ab63bfd918ad9.tar.xz
Add Thread.ResetAbort() to various thread loops to clean up errors on
shutdown. Fixes Mantis #8494. Threads are aborted when shutting down and ThreadAbortException is odd in that it is rethrown at the end of the catch unless the abort is reset. No functional changes but fewer error messages on shutdown.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-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
3 files changed, 37 insertions, 17 deletions
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 }