aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index edf91cb..32ba590 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -155,7 +155,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
155 155
156 private int m_defaultRTO = 0; 156 private int m_defaultRTO = 0;
157 private int m_maxRTO = 0; 157 private int m_maxRTO = 0;
158 158 private int m_ackTimeout = 0;
159 private int m_pausedAckTimeout = 0;
159 private bool m_disableFacelights = false; 160 private bool m_disableFacelights = false;
160 161
161 public Socket Server { get { return null; } } 162 public Socket Server { get { return null; } }
@@ -198,11 +199,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
198 m_defaultRTO = config.GetInt("DefaultRTO", 0); 199 m_defaultRTO = config.GetInt("DefaultRTO", 0);
199 m_maxRTO = config.GetInt("MaxRTO", 0); 200 m_maxRTO = config.GetInt("MaxRTO", 0);
200 m_disableFacelights = config.GetBoolean("DisableFacelights", false); 201 m_disableFacelights = config.GetBoolean("DisableFacelights", false);
202 m_ackTimeout = 1000 * config.GetInt("AckTimeout", 60);
203 m_pausedAckTimeout = 1000 * config.GetInt("PausedAckTimeout", 300);
201 } 204 }
202 else 205 else
203 { 206 {
204 PrimUpdatesPerCallback = 100; 207 PrimUpdatesPerCallback = 100;
205 TextureSendLimit = 20; 208 TextureSendLimit = 20;
209 m_ackTimeout = 1000 * 60; // 1 minute
210 m_pausedAckTimeout = 1000 * 300; // 5 minutes
206 } 211 }
207 212
208 #region BinaryStats 213 #region BinaryStats
@@ -491,8 +496,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
491 return; 496 return;
492 497
493 // Disconnect an agent if no packets are received for some time 498 // Disconnect an agent if no packets are received for some time
494 //FIXME: Make 60 an .ini setting 499 int timeoutTicks = m_ackTimeout;
495 if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60) 500
501 // Allow more slack if the client is "paused" eg file upload dialogue is open
502 // Some sort of limit is needed in case the client crashes, loses its network connection
503 // or some other disaster prevents it from sendung the AgentResume
504 if (udpClient.IsPaused)
505 timeoutTicks = m_pausedAckTimeout;
506
507 if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks)
496 { 508 {
497 m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); 509 m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
498 StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); 510 StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();