presence detector: don't even try to logout agents that didn't made to root

0.9.1.0-post-fixes
UbitUmarov 2019-04-06 12:25:54 +01:00
parent 5ed2b5c990
commit 0ebb1f3f4b
1 changed files with 3 additions and 8 deletions

View File

@ -50,7 +50,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public void AddRegion(Scene scene)
{
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
scene.EventManager.OnNewClient += OnNewClient;
m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID);
@ -61,7 +60,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public void RemoveRegion(Scene scene)
{
scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent;
scene.EventManager.OnNewClient -= OnNewClient;
m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID);
}
@ -71,6 +69,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
if (sp.IsNPC)
return;
sp.ControllingClient.OnConnectionClosed += OnConnectionClose;
if (sp.gotCrossUpdate)
{
Util.FireAndForget(delegate
@ -89,11 +89,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID);
}
public void OnNewClient(IClientAPI client)
{
client.OnConnectionClosed += OnConnectionClose;
}
public void OnConnectionClose(IClientAPI client)
{
if (client != null && client.SceneAgent != null && !client.SceneAgent.IsChildAgent)