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 // and the scene presence and the client, if they exist
try try
{ {
ScenePresence sp = GetScenePresence(agentID); // We need to wait for the client to make UDP contact first.
PresenceService.LogoutAgent(sp.ControllingClient.SessionId); // It's the UDP contact that creates the scene presence
ScenePresence sp = WaitGetScenePresence(agentID);
if (sp != null) 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! // BANG! SLASH!
m_authenticateHandler.RemoveCircuit(agentID); m_authenticateHandler.RemoveCircuit(agentID);