aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 2228f39..04c9cb1 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -419,7 +419,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
419 419
420 int dataLength = buffer.DataLength; 420 int dataLength = buffer.DataLength;
421 421
422 // Keep appending ACKs until there is no room left in the packet or there are 422 // Keep appending ACKs until there is no room left in the buffer or there are
423 // no more ACKs to append 423 // no more ACKs to append
424 uint ackCount = 0; 424 uint ackCount = 0;
425 uint ack; 425 uint ack;
@@ -654,11 +654,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
654 654
655 // Create the LLClientView 655 // Create the LLClientView
656 LLClientView clientApi = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); 656 LLClientView clientApi = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
657 clientApi.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler;
658 clientApi.OnLogout += LogoutHandler; 657 clientApi.OnLogout += LogoutHandler;
659 clientApi.OnConnectionClosed += 658 clientApi.OnConnectionClosed += ConnectionClosedHandler;
660 delegate(IClientAPI client)
661 { if (client is LLClientView) RemoveClient(((LLClientView)client).UDPClient); };
662 659
663 // Start the IClientAPI 660 // Start the IClientAPI
664 m_scene.ClientManager.Add(circuitCode, clientApi); 661 m_scene.ClientManager.Add(circuitCode, clientApi);
@@ -808,7 +805,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
808 805
809 private void LogoutHandler(IClientAPI client) 806 private void LogoutHandler(IClientAPI client)
810 { 807 {
808 client.OnLogout -= LogoutHandler;
809
811 client.SendLogoutPacket(); 810 client.SendLogoutPacket();
811
812 if (client is LLClientView)
813 RemoveClient(((LLClientView)client).UDPClient);
814 }
815
816 private void ConnectionClosedHandler(IClientAPI client)
817 {
818 client.OnConnectionClosed -= ConnectionClosedHandler;
819
812 if (client is LLClientView) 820 if (client is LLClientView)
813 RemoveClient(((LLClientView)client).UDPClient); 821 RemoveClient(((LLClientView)client).UDPClient);
814 } 822 }