diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f7bb817644..1304e163e0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -517,7 +517,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public void Close(bool sendStop) { - IsActive = false; +// IsActive = false; // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. lock (CloseSyncLock) @@ -525,7 +525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!IsActive) return; - IsActive = false; +// IsActive = false; CloseWithoutChecks(sendStop); } } @@ -552,7 +552,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(disable, ThrottleOutPacketType.Unknown); } - IsActive = false; +// IsActive = false; // Shutdown the image manager ImageManager.Close(); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bf2db58b36..c260fb2f0c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2966,10 +2966,12 @@ namespace OpenSim.Region.Framework.Scenes try { ScenePresence sp = GetScenePresence(agentID); - PresenceService.LogoutAgent(sp.ControllingClient.SessionId); - + if (sp != null) + { + PresenceService.LogoutAgent(sp.ControllingClient.SessionId); sp.ControllingClient.Close(); + } // BANG! SLASH! m_authenticateHandler.RemoveCircuit(agentID);