aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index c58b24b..12e5452 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -637,9 +637,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
637 # endregion 637 # endregion
638 638
639 protected int m_terrainCheckerCount = 0; 639 protected int m_terrainCheckerCount = 0;
640
640 /// <summary> 641 /// <summary>
641 /// Event handler for check client timer 642 /// Event handler for check client timer
642 /// checks to ensure that the client is still connected 643 /// Checks to ensure that the client is still connected. If the client has failed to respond to many pings
644 /// in succession then close down the connection.
643 /// </summary> 645 /// </summary>
644 /// <param name="sender"></param> 646 /// <param name="sender"></param>
645 /// <param name="e"></param> 647 /// <param name="e"></param>
@@ -648,11 +650,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
648 if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported) 650 if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported)
649 { 651 {
650 m_probesWithNoIngressPackets++; 652 m_probesWithNoIngressPackets++;
651 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) 653 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked)
654 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked))
652 { 655 {
653
654 if (OnConnectionClosed != null) 656 if (OnConnectionClosed != null)
655 { 657 {
658 m_log.WarnFormat(
659 "[CLIENT]: Client for agent {0} {1} has stopped responding to pings. Closing connection",
660 Name, AgentId);
661
656 OnConnectionClosed(this); 662 OnConnectionClosed(this);
657 } 663 }
658 } 664 }
@@ -682,6 +688,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
682 688
683 // Establish our two timers. We could probably get this down to one 689 // Establish our two timers. We could probably get this down to one
684 690
691 // Ping the client regularly to check that it's still there
685 m_clientPingTimer = new Timer(5000); 692 m_clientPingTimer = new Timer(5000);
686 m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); 693 m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
687 m_clientPingTimer.Enabled = true; 694 m_clientPingTimer.Enabled = true;
@@ -3402,12 +3409,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3402 /// <summary> 3409 /// <summary>
3403 /// 3410 ///
3404 /// </summary> 3411 /// </summary>
3405 /// <param name="client"> 3412 /// <param name="client"></param>
3406 /// A <see cref="IClientAPI"/> 3413 /// <returns></returns>
3407 /// </param>
3408 /// <returns>
3409 /// A <see cref="System.Boolean"/>
3410 /// </returns>
3411 protected virtual bool Logout(IClientAPI client) 3414 protected virtual bool Logout(IClientAPI client)
3412 { 3415 {
3413 m_log.Info("[CLIENT]: Got a logout request"); 3416 m_log.Info("[CLIENT]: Got a logout request");