From 0340531ff0bfe01334c030b15b6c3b118712703e Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 6 Apr 2008 02:05:19 +0000 Subject: * Implemented AgentPause and AgentResume. AgentPause extends the timeout for a client at the server by 3x. AgentResume restores the timeout to the normal amount. * The linden client still doesn't like it when you have an image select box open for more then 100 or so seconds. --- OpenSim/Region/ClientStack/ClientView.cs | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index e4f28db..a67c247 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -73,6 +73,8 @@ namespace OpenSim.Region.ClientStack private int m_cachedTextureSerial = 0; private Timer m_clientPingTimer; + private bool m_clientBlocked = false; + private int m_packetsReceived = 0; private int m_lastPacketsReceivedSentToScene = 0; private int m_unAckedBytes = 0; @@ -569,8 +571,9 @@ namespace OpenSim.Region.ClientStack if (m_packetsReceived == m_lastPacketsReceived) { m_probesWithNoIngressPackets++; - if (m_probesWithNoIngressPackets > 30) + if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) { + if (OnConnectionClosed != null) { OnConnectionClosed(this); @@ -3336,6 +3339,18 @@ namespace OpenSim.Region.ClientStack m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles); break; + case PacketType.AgentPause: + m_probesWithNoIngressPackets = 0; + m_clientBlocked = true; + break; + + case PacketType.AgentResume: + m_probesWithNoIngressPackets = 0; + m_clientBlocked = false; + SendStartPingCheck(0); + + break; + #endregion #region Objects/m_sceneObjects @@ -4316,14 +4331,14 @@ namespace OpenSim.Region.ClientStack // TODO: handle this packet m_log.Warn("[CLIENT]: unhandled MapItemRequest packet"); break; - case PacketType.AgentResume: + //case PacketType.AgentResume: // TODO: handle this packet - m_log.Warn("[CLIENT]: unhandled AgentResume packet"); - break; - case PacketType.AgentPause: + //m_log.Warn("[CLIENT]: unhandled AgentResume packet"); + //break; + //case PacketType.AgentPause: // TODO: handle this packet - m_log.Warn("[CLIENT]: unhandled AgentPause packet"); - break; + //m_log.Warn("[CLIENT]: unhandled AgentPause packet"); + //break; case PacketType.TransferAbort: // TODO: handle this packet m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); -- cgit v1.1