mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
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.
This commit is contained in:
9
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
Normal file → Executable file
9
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
Normal file → Executable file
@@ -221,7 +221,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// </summary>
|
||||
private static void CmdHandlerThreadLoop()
|
||||
{
|
||||
while (true)
|
||||
bool running = true;
|
||||
while (running)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -230,7 +231,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
DoOneCmdHandlerPass();
|
||||
Watchdog.UpdateThread();
|
||||
}
|
||||
catch ( System.Threading.ThreadAbortException) { }
|
||||
catch ( System.Threading.ThreadAbortException)
|
||||
{
|
||||
Thread.ResetAbort();
|
||||
running = false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e);
|
||||
|
||||
Reference in New Issue
Block a user