HG bug fix. Must wait for client's UDP contact before getting scene presence.

viewer-2-initial-appearance
Diva Canto 2011-01-06 12:47:13 -08:00
parent d3ebf64369
commit 5b43f9cac4
1 changed files with 11 additions and 4 deletions

View File

@ -2592,12 +2592,19 @@ namespace OpenSim.Region.Framework.Scenes
// and the scene presence and the client, if they exist
try
{
ScenePresence sp = GetScenePresence(agentID);
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
// We need to wait for the client to make UDP contact first.
// It's the UDP contact that creates the scene presence
ScenePresence sp = WaitGetScenePresence(agentID);
if (sp != null)
sp.ControllingClient.Close();
{
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
sp.ControllingClient.Close();
}
else
{
m_log.WarnFormat("[SCENE]: Could not find scene presence for {0}", agentID);
}
// BANG! SLASH!
m_authenticateHandler.RemoveCircuit(agentID);