* 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.
0.6.0-stable
Teravus Ovares 2008-04-06 02:05:19 +00:00
parent 9e7785fb03
commit 0340531ff0
1 changed files with 22 additions and 7 deletions

View File

@ -73,6 +73,8 @@ namespace OpenSim.Region.ClientStack
private int m_cachedTextureSerial = 0; private int m_cachedTextureSerial = 0;
private Timer m_clientPingTimer; private Timer m_clientPingTimer;
private bool m_clientBlocked = false;
private int m_packetsReceived = 0; private int m_packetsReceived = 0;
private int m_lastPacketsReceivedSentToScene = 0; private int m_lastPacketsReceivedSentToScene = 0;
private int m_unAckedBytes = 0; private int m_unAckedBytes = 0;
@ -569,8 +571,9 @@ namespace OpenSim.Region.ClientStack
if (m_packetsReceived == m_lastPacketsReceived) if (m_packetsReceived == m_lastPacketsReceived)
{ {
m_probesWithNoIngressPackets++; m_probesWithNoIngressPackets++;
if (m_probesWithNoIngressPackets > 30) if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) || (m_probesWithNoIngressPackets > 90 && m_clientBlocked))
{ {
if (OnConnectionClosed != null) if (OnConnectionClosed != null)
{ {
OnConnectionClosed(this); OnConnectionClosed(this);
@ -3336,6 +3339,18 @@ namespace OpenSim.Region.ClientStack
m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles); m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles);
break; break;
case PacketType.AgentPause:
m_probesWithNoIngressPackets = 0;
m_clientBlocked = true;
break;
case PacketType.AgentResume:
m_probesWithNoIngressPackets = 0;
m_clientBlocked = false;
SendStartPingCheck(0);
break;
#endregion #endregion
#region Objects/m_sceneObjects #region Objects/m_sceneObjects
@ -4316,14 +4331,14 @@ namespace OpenSim.Region.ClientStack
// TODO: handle this packet // TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled MapItemRequest packet"); m_log.Warn("[CLIENT]: unhandled MapItemRequest packet");
break; break;
case PacketType.AgentResume: //case PacketType.AgentResume:
// TODO: handle this packet // TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled AgentResume packet"); //m_log.Warn("[CLIENT]: unhandled AgentResume packet");
break; //break;
case PacketType.AgentPause: //case PacketType.AgentPause:
// TODO: handle this packet // TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled AgentPause packet"); //m_log.Warn("[CLIENT]: unhandled AgentPause packet");
break; //break;
case PacketType.TransferAbort: case PacketType.TransferAbort:
// TODO: handle this packet // TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); m_log.Warn("[CLIENT]: unhandled TransferAbort packet");