diff options
author | Justin Clark-Casey (justincc) | 2012-06-12 01:23:40 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-12 01:25:09 +0100 |
commit | 8c7149063bce41cac6543757c7b917583f21ea90 (patch) | |
tree | 6fe9cee7b0eb9c2d174a0eec117c3f0f762d5e21 /OpenSim/Region/CoreModules | |
parent | Comment out the scene presence sitting debug log messages for now (diff) | |
download | opensim-SC-8c7149063bce41cac6543757c7b917583f21ea90.zip opensim-SC-8c7149063bce41cac6543757c7b917583f21ea90.tar.gz opensim-SC-8c7149063bce41cac6543757c7b917583f21ea90.tar.bz2 opensim-SC-8c7149063bce41cac6543757c7b917583f21ea90.tar.xz |
In PresenceDetector.OnConnectionClose(), use the IsChildAgent check already available on IClientAPI.SceneAgent rather than retrieving it again by scanning all scenes.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index ccfbf78..b43745c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -64,7 +64,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
64 | scene.EventManager.OnNewClient -= OnNewClient; | 64 | scene.EventManager.OnNewClient -= OnNewClient; |
65 | 65 | ||
66 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); | 66 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); |
67 | |||
68 | } | 67 | } |
69 | 68 | ||
70 | public void OnMakeRootAgent(ScenePresence sp) | 69 | public void OnMakeRootAgent(ScenePresence sp) |
@@ -80,18 +79,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
80 | 79 | ||
81 | public void OnConnectionClose(IClientAPI client) | 80 | public void OnConnectionClose(IClientAPI client) |
82 | { | 81 | { |
83 | if (client.IsLoggingOut) | 82 | if (client.IsLoggingOut && !client.SceneAgent.IsChildAgent) |
84 | { | 83 | { |
85 | object sp = null; | ||
86 | if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) | ||
87 | { | ||
88 | if (sp is ScenePresence) | ||
89 | { | ||
90 | if (((ScenePresence)sp).IsChildAgent) | ||
91 | return; | ||
92 | } | ||
93 | } | ||
94 | |||
95 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 84 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
96 | m_PresenceService.LogoutAgent(client.SessionId); | 85 | m_PresenceService.LogoutAgent(client.SessionId); |
97 | } | 86 | } |