aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2014-09-13 16:39:56 +0200
committerMelanie Thielker2014-09-13 16:39:56 +0200
commit8ab5f2ce849276dbc1fb92c288fb06fed1123f31 (patch)
tree9da31d4edf850c000441b9e92e827e366d278edc
parentIf a client's SceneAgent is null, that client is not fully logged in or (diff)
downloadopensim-SC-8ab5f2ce849276dbc1fb92c288fb06fed1123f31.zip
opensim-SC-8ab5f2ce849276dbc1fb92c288fb06fed1123f31.tar.gz
opensim-SC-8ab5f2ce849276dbc1fb92c288fb06fed1123f31.tar.bz2
opensim-SC-8ab5f2ce849276dbc1fb92c288fb06fed1123f31.tar.xz
When CloseAgnt is called with an agent id that doesn't have a presence, check for stray clients and clean them up instead of failing.
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d336eda..55e7da4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4743,6 +4743,18 @@ namespace OpenSim.Region.Framework.Scenes
4743 4743
4744 if (sp == null) 4744 if (sp == null)
4745 { 4745 {
4746 // If there is no scene presence, we may be handling a dead
4747 // client. These can keep an avatar from reentering a region
4748 // and since they don't get cleaned up they will stick
4749 // around until region restart. So, if there is no SP,
4750 // remove the client as well.
4751 IClientAPI client = null;
4752 if (m_clientManager.TryGetValue(agentID, out client))
4753 {
4754 m_clientManager.Remove(agentID);
4755 m_log.DebugFormat( "[SCENE]: Dead client for agent ID {0} was cleaned up in {1}", agentID, Name);
4756 return true;
4757 }
4746 m_log.DebugFormat( 4758 m_log.DebugFormat(
4747 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}", 4759 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}",
4748 agentID, Name); 4760 agentID, Name);