aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 75f783b..d310d65 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();
@@ -916,7 +928,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
916 UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; 928 UDPPacketBuffer buffer = (UDPPacketBuffer)array[0];
917 UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; 929 UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1];
918 930
919 m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); 931 m_log.DebugFormat(
932 "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} from {1}",
933 uccp.CircuitCode.Code, buffer.RemoteEndPoint);
920 934
921 remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; 935 remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
922 936
@@ -1352,7 +1366,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1352 } 1366 }
1353 else 1367 else
1354 { 1368 {
1355 m_log.DebugFormat("[LLUDPSERVER]: Dropping incoming {0} packet for dead client {1}", packet.Type, udpClient.AgentID); 1369 m_log.DebugFormat(
1370 "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}",
1371 packet.Type, udpClient.AgentID, m_scene.RegionInfo.RegionName);
1356 } 1372 }
1357 } 1373 }
1358 1374