diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e27b2ba..12fd813 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2592,12 +2592,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2592 | // and the scene presence and the client, if they exist | 2592 | // and the scene presence and the client, if they exist |
2593 | try | 2593 | try |
2594 | { | 2594 | { |
2595 | ScenePresence sp = GetScenePresence(agentID); | 2595 | // We need to wait for the client to make UDP contact first. |
2596 | PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | 2596 | // It's the UDP contact that creates the scene presence |
2597 | 2597 | ScenePresence sp = WaitGetScenePresence(agentID); | |
2598 | if (sp != null) | 2598 | if (sp != null) |
2599 | sp.ControllingClient.Close(); | 2599 | { |
2600 | PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | ||
2600 | 2601 | ||
2602 | sp.ControllingClient.Close(); | ||
2603 | } | ||
2604 | else | ||
2605 | { | ||
2606 | m_log.WarnFormat("[SCENE]: Could not find scene presence for {0}", agentID); | ||
2607 | } | ||
2601 | // BANG! SLASH! | 2608 | // BANG! SLASH! |
2602 | m_authenticateHandler.RemoveCircuit(agentID); | 2609 | m_authenticateHandler.RemoveCircuit(agentID); |
2603 | 2610 | ||