aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs18
-rw-r--r--bin/OpenSimDefaults.ini13
2 files changed, 28 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();
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 27d86e8..c67e45a 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -536,6 +536,19 @@
536 ; 536 ;
537 ;DisableFacelights = false 537 ;DisableFacelights = false
538 538
539 ; The time to wait before disconecting an unresponsive client.
540 ; The time is in seconds. The default is one minute
541 ;
542 ;AckTimeout = 60
543
544 ; The time to wait before disconecting an unresponsive paused client.
545 ; A client can be paused when the file selection dialog is open during file upload.
546 ; This gives extra time to find files via the dialog but will still disconnect if
547 ; the client crashes or loses its network connection
548 ; The time is in seconds. The default is five minutes.
549 ;
550 ;PausedAckTimeout = 300
551
539[ClientStack.LindenCaps] 552[ClientStack.LindenCaps]
540 ;; Long list of capabilities taken from 553 ;; Long list of capabilities taken from
541 ;; http://wiki.secondlife.com/wiki/Current_Sim_Capabilities 554 ;; http://wiki.secondlife.com/wiki/Current_Sim_Capabilities