diff options
author | Robert Adams | 2019-02-27 07:49:52 -0800 |
---|---|---|
committer | Robert Adams | 2019-02-27 07:49:52 -0800 |
commit | bd1b992aaf57154fd57403348a1ab63bfd918ad9 (patch) | |
tree | 45c627049706614e14de445e9dab2dcc9b072b9a /OpenSim/Region/ScriptEngine/Shared | |
parent | combat module: those parcel changes are now handled elsewhere (diff) | |
download | opensim-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/ScriptEngine/Shared')
-rwxr-xr-x[-rw-r--r--] | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | 9 |
1 files changed, 7 insertions, 2 deletions
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); |