From 427a80bba550380a05d78fe7895fd9f6891f39ea Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 6 Nov 2008 19:52:06 +0000 Subject: [PATCH] * test: Add assert checking that the circuit which trigger the socket exception has been closed --- OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs | 3 ++- .../Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs index 148e03faa6..5fd36195d2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs @@ -179,13 +179,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// Close a client circuit only /// /// public virtual void CloseCircuit(uint circuitcode) { m_networkHandler.RemoveClientCircuit(circuitcode); + // XXX: Why is this commented out? Possibly because close mechanisms are so tangled right now //m_scene.ClientManager.CloseAllAgents(circuitcode); } diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs index dc1c63d444..a40677eb13 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs @@ -283,6 +283,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests testLLUDPServer.LoadReceiveWithBeginException(epA); testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(2, "packet3"), epB); testLLUDPServer.ReceiveData(null); + + Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA)); Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3)); Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3));