diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index d4bbc2acde..d06c55b111 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -251,13 +251,21 @@ namespace pCampBot } /// - /// Shutting down all bots + /// Shut down all bots /// + /// + /// We launch each shutdown on its own thread so that a slow shutting down bot doesn't hold up all the others. + /// public void doBotShutdown() { lock (m_lBot) - foreach (Bot pb in m_lBot) - pb.shutdown(); + { + foreach (Bot bot in m_lBot) + { + Bot thisBot = bot; + Util.FireAndForget(o => thisBot.shutdown()); + } + } } /// @@ -271,11 +279,8 @@ namespace pCampBot private void HandleShutdown(string module, string[] cmd) { - Util.FireAndForget(o => - { - m_log.Warn("[BOTMANAGER]: Shutting down bots"); - doBotShutdown(); - }); + m_log.Info("[BOTMANAGER]: Shutting down bots"); + doBotShutdown(); } private void HandleShowRegions(string module, string[] cmd)