aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorCharles Krinke2008-09-03 03:35:54 +0000
committerCharles Krinke2008-09-03 03:35:54 +0000
commite044d83679757473204dabb37002024f70b5ff6b (patch)
tree745f86a1c3eb51829a170ae8560bca0b3c530e57 /OpenSim/Region/ClientStack
parentMantis#2105. Thank you kindly, HomerHorwitz for a patch that addresses: (diff)
downloadopensim-SC_OLD-e044d83679757473204dabb37002024f70b5ff6b.zip
opensim-SC_OLD-e044d83679757473204dabb37002024f70b5ff6b.tar.gz
opensim-SC_OLD-e044d83679757473204dabb37002024f70b5ff6b.tar.bz2
opensim-SC_OLD-e044d83679757473204dabb37002024f70b5ff6b.tar.xz
Mantis#2106. Thank you kindly, HomerHorwitz for a patch that:
The attached patch fixes connectivety checking of root- and child-agents. If an agent's client isn't sending any packets for some time (not even to StartPingCheck packets), we assume that we lost connection and try to log them out.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 663344e..6e37e0c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -94,6 +94,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
94 94
95 private bool m_SendLogoutPacketWhenClosing = true; 95 private bool m_SendLogoutPacketWhenClosing = true;
96 96
97 private int m_inPacketsChecked = 0;
98
97 /* protected variables */ 99 /* protected variables */
98 100
99 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = 101 protected static Dictionary<PacketType, PacketMethod> PacketHandlers =
@@ -670,11 +672,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
670 /// <param name="e"></param> 672 /// <param name="e"></param>
671 protected void CheckClientConnectivity(object sender, ElapsedEventArgs e) 673 protected void CheckClientConnectivity(object sender, ElapsedEventArgs e)
672 { 674 {
673 if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported) 675 if (m_PacketHandler.PacketsReceived == m_inPacketsChecked)
674 { 676 {
677 // no packet came in since the last time we checked...
678
675 m_probesWithNoIngressPackets++; 679 m_probesWithNoIngressPackets++;
676 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) 680 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) // agent active
677 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) 681 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) // agent paused
678 { 682 {
679 m_clientPingTimer.Enabled = false; 683 m_clientPingTimer.Enabled = false;
680 684
@@ -697,6 +701,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
697 { 701 {
698 // Something received in the meantime - we can reset the counters 702 // Something received in the meantime - we can reset the counters
699 m_probesWithNoIngressPackets = 0; 703 m_probesWithNoIngressPackets = 0;
704 // ... and store the current number of packets received to find out if another one got in on the next cycle
705 m_inPacketsChecked = m_PacketHandler.PacketsReceived;
700 } 706 }
701 707
702 } 708 }