aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/BotManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index d4bbc2a..d06c55b 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -251,13 +251,21 @@ namespace pCampBot
251 } 251 }
252 252
253 /// <summary> 253 /// <summary>
254 /// Shutting down all bots 254 /// Shut down all bots
255 /// </summary> 255 /// </summary>
256 /// <remarks>
257 /// We launch each shutdown on its own thread so that a slow shutting down bot doesn't hold up all the others.
258 /// </remarks>
256 public void doBotShutdown() 259 public void doBotShutdown()
257 { 260 {
258 lock (m_lBot) 261 lock (m_lBot)
259 foreach (Bot pb in m_lBot) 262 {
260 pb.shutdown(); 263 foreach (Bot bot in m_lBot)
264 {
265 Bot thisBot = bot;
266 Util.FireAndForget(o => thisBot.shutdown());
267 }
268 }
261 } 269 }
262 270
263 /// <summary> 271 /// <summary>
@@ -271,11 +279,8 @@ namespace pCampBot
271 279
272 private void HandleShutdown(string module, string[] cmd) 280 private void HandleShutdown(string module, string[] cmd)
273 { 281 {
274 Util.FireAndForget(o => 282 m_log.Info("[BOTMANAGER]: Shutting down bots");
275 { 283 doBotShutdown();
276 m_log.Warn("[BOTMANAGER]: Shutting down bots");
277 doBotShutdown();
278 });
279 } 284 }
280 285
281 private void HandleShowRegions(string module, string[] cmd) 286 private void HandleShowRegions(string module, string[] cmd)