mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* Stop warnings about non existent scene presences/entities being removed on client log off
* This is being done by preventing close from being called twice on child agent closure (nres which would have been thrown are being swallowed). * However, it should be possible to do much better cleanup on this code in the future
This commit is contained in:
@@ -584,26 +584,26 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
lock (Entities)
|
||||
{
|
||||
if (Entities.Remove(agentID))
|
||||
{
|
||||
//m_log.InfoFormat("[SCENE] Removed scene presence {0} from entities list", agentID);
|
||||
}
|
||||
else
|
||||
if (!Entities.Remove(agentID))
|
||||
{
|
||||
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", agentID);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_log.InfoFormat("[SCENE] Removed scene presence {0} from entities list", agentID);
|
||||
// }
|
||||
}
|
||||
|
||||
lock (ScenePresences)
|
||||
{
|
||||
if (ScenePresences.Remove(agentID))
|
||||
if (!ScenePresences.Remove(agentID))
|
||||
{
|
||||
//m_log.InfoFormat("[SCENE] Removed scene presence {0}", agentID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
||||
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_log.InfoFormat("[SCENE] Removed scene presence {0} from scene presences list", agentID);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2259,6 +2259,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
childagentYN = avatar.IsChildAgent;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
@@ -2295,6 +2296,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// We don't know which count to remove it from
|
||||
// Avatar is already disposed :/
|
||||
}
|
||||
|
||||
m_eventManager.TriggerOnRemovePresence(agentID);
|
||||
Broadcast(delegate(IClientAPI client)
|
||||
{
|
||||
@@ -2631,6 +2633,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
m_innerScene.removeUserCount(true);
|
||||
}
|
||||
|
||||
// Tell a single agent to disconnect from the region.
|
||||
presence.ControllingClient.SendShutdownConnectionNotice();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user