aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-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 }