If an exception occurs in the AsyncCommandManager loop, spit it out to log rather than silently swallowing it.

This might help diagnose the cause of http://opensimulator.org/mantis/view.php?id=6651 where sometimes scripts fail to start on region start.
cpu-performance
Justin Clark-Casey (justincc) 2013-05-30 23:51:35 +01:00
parent 6b88a665d3
commit 46335b103e
1 changed files with 6 additions and 8 deletions

View File

@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// </summary> /// </summary>
public class AsyncCommandManager public class AsyncCommandManager
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static Thread cmdHandlerThread; private static Thread cmdHandlerThread;
private static int cmdHandlerThreadCycleSleepms; private static int cmdHandlerThreadCycleSleepms;
@ -183,17 +183,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
try try
{ {
while (true) Thread.Sleep(cmdHandlerThreadCycleSleepms);
{
Thread.Sleep(cmdHandlerThreadCycleSleepms);
DoOneCmdHandlerPass(); DoOneCmdHandlerPass();
Watchdog.UpdateThread(); Watchdog.UpdateThread();
}
} }
catch catch (Exception e)
{ {
m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e);
} }
} }
} }