From 416bbe9583c77e2b1087b375d29ce1ace9c4b050 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Aug 2013 22:44:43 +0100 Subject: Stop error messages being misleadingly generated when on client connection activity timeout, a root connection triggers a CloseAgent to a neighbour region which has already closed the agent due to inactivity. Also separates out log messages to distinguish between close not finding an agent and wrong auth token, and downgrades former to debug and latter to warn --- OpenSim/Region/Framework/Scenes/Scene.cs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b58e7c4..cb12d65 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4416,10 +4416,27 @@ namespace OpenSim.Region.Framework.Scenes // Check that the auth_token is valid AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); - if (acd != null && acd.SessionID.ToString() == auth_token) + + if (acd == null) + { + m_log.DebugFormat( + "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", + agentID, Name); + + return false; + } + + if (acd.SessionID.ToString() == auth_token) + { return IncomingCloseAgent(agentID, force); + } else - m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); + { + m_log.WarnFormat( + "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", + agentID, auth_token, Name); + } + return false; } -- cgit v1.1