aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1734704..eb4ba41 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1199,15 +1199,17 @@ namespace OpenSim.Region.Framework.Scenes
1199 avatar.ControllingClient.SendShutdownConnectionNotice(); 1199 avatar.ControllingClient.SendShutdownConnectionNotice();
1200 }); 1200 });
1201 1201
1202 // Stop updating the scene objects and agents.
1203 m_shuttingDown = true;
1204
1202 // Wait here, or the kick messages won't actually get to the agents before the scene terminates. 1205 // Wait here, or the kick messages won't actually get to the agents before the scene terminates.
1206 // We also need to wait to avoid a race condition with the scene update loop which might not yet
1207 // have checked ShuttingDown.
1203 Thread.Sleep(500); 1208 Thread.Sleep(500);
1204 1209
1205 // Stop all client threads. 1210 // Stop all client threads.
1206 ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(); }); 1211 ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(); });
1207 1212
1208 // Stop updating the scene objects and agents.
1209 m_shuttingDown = true;
1210
1211 m_log.Debug("[SCENE]: Persisting changed objects"); 1213 m_log.Debug("[SCENE]: Persisting changed objects");
1212 EventManager.TriggerSceneShuttingDown(this); 1214 EventManager.TriggerSceneShuttingDown(this);
1213 1215