On an Exception in Scene.RemoveClient(), always remove the client (and SP) structure so that logout on unexpired packets isn't retriggered, causing the same exception
parent
2b02d3dc84
commit
3d95015686
|
@ -3104,6 +3104,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Avatar is already disposed :/
|
// Avatar is already disposed :/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
m_eventManager.TriggerOnRemovePresence(agentID);
|
m_eventManager.TriggerOnRemovePresence(agentID);
|
||||||
|
|
||||||
if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc)
|
if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc)
|
||||||
|
@ -3122,10 +3124,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
agentTransactions.RemoveAgentAssetTransactions(agentID);
|
agentTransactions.RemoveAgentAssetTransactions(agentID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Remove the avatar from the scene
|
finally
|
||||||
|
{
|
||||||
|
// Always clean these structures up so that any failure above doesn't cause them to remain in the
|
||||||
|
// scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering
|
||||||
|
// the same cleanup exception continually.
|
||||||
|
// TODO: This should probably extend to the whole method, but we don't want to also catch the NRE
|
||||||
|
// since this would hide the underlying failure and other associated problems.
|
||||||
m_sceneGraph.RemoveScenePresence(agentID);
|
m_sceneGraph.RemoveScenePresence(agentID);
|
||||||
m_clientManager.Remove(agentID);
|
m_clientManager.Remove(agentID);
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue