AgentCircuitManager: always remove possible old one on add
parent
38fc68ac0c
commit
b440a9534d
|
@ -89,6 +89,7 @@ namespace OpenSim.Framework
|
||||||
/// <param name="agentData"></param>
|
/// <param name="agentData"></param>
|
||||||
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
|
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
|
RemoveCircuit(agentData.AgentID); // no duplications
|
||||||
m_agentCircuits[circuitCode] = agentData;
|
m_agentCircuits[circuitCode] = agentData;
|
||||||
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
|
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4097,10 +4097,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (cache != null)
|
if (cache != null)
|
||||||
// cache.Remove(acd.firstname + " " + acd.lastname);
|
// cache.Remove(acd.firstname + " " + acd.lastname);
|
||||||
cache.Remove(acd.AgentID);
|
cache.Remove(acd.AgentID);
|
||||||
|
|
||||||
// Remove any preexisting circuit - we don't want duplicates
|
|
||||||
// This is a stab at preventing avatar "ghosting"
|
|
||||||
m_authenticateHandler.RemoveCircuit(acd.AgentID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_authenticateHandler.AddNewCircuit(acd.circuitcode, acd);
|
m_authenticateHandler.AddNewCircuit(acd.circuitcode, acd);
|
||||||
|
@ -4774,8 +4770,10 @@ Label_GroupsDone:
|
||||||
// and since they don't get cleaned up they will stick
|
// and since they don't get cleaned up they will stick
|
||||||
// around until region restart. So, if there is no SP,
|
// around until region restart. So, if there is no SP,
|
||||||
// remove the client as well.
|
// remove the client as well.
|
||||||
IClientAPI client = null;
|
if (m_authenticateHandler != null)
|
||||||
if (m_clientManager.TryGetValue(agentID, out client))
|
m_authenticateHandler.RemoveCircuit(agentID);
|
||||||
|
|
||||||
|
if (m_clientManager.TryGetValue(agentID, out IClientAPI client))
|
||||||
{
|
{
|
||||||
m_clientManager.Remove(agentID);
|
m_clientManager.Remove(agentID);
|
||||||
if (CapsModule != null)
|
if (CapsModule != null)
|
||||||
|
|
Loading…
Reference in New Issue