aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-19 18:50:31 -0700
committerJohn Hurliman2009-10-19 18:50:31 -0700
commit0a6ea33ac8faa015ad8014b429be0046ba3b3e0a (patch)
tree452cddb4228162a25d363de7838b2cb7fc3af523 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
parent* Removed OpenSim.Data.NHibernate (diff)
downloadopensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.zip
opensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.tar.gz
opensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.tar.bz2
opensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.tar.xz
* Optimized sending of terrain data
* Send terrain data in a spiral pattern instead of a typewriter pattern (placeholder until terrain data becomes part of the interest list management) * Added a debug line when resent packets are being sent
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs23
1 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 74175d0..a6ead5e 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -372,23 +372,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
372 372
373 public void ResendUnacked(LLUDPClient udpClient) 373 public void ResendUnacked(LLUDPClient udpClient)
374 { 374 {
375 if (udpClient.IsConnected && udpClient.NeedAcks.Count > 0) 375 if (!udpClient.IsConnected)
376 return;
377
378 // Disconnect an agent if no packets are received for some time
379 //FIXME: Make 60 an .ini setting
380 if (Environment.TickCount - udpClient.TickLastPacketReceived > 1000 * 60)
376 { 381 {
377 // Disconnect an agent if no packets are received for some time 382 m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
378 //FIXME: Make 60 an .ini setting
379 if (Environment.TickCount - udpClient.TickLastPacketReceived > 1000 * 60)
380 {
381 m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
382 383
383 RemoveClient(udpClient); 384 RemoveClient(udpClient);
384 return; 385 return;
385 } 386 }
386 387
388 if (udpClient.NeedAcks.Count > 0)
389 {
387 // Get a list of all of the packets that have been sitting unacked longer than udpClient.RTO 390 // Get a list of all of the packets that have been sitting unacked longer than udpClient.RTO
388 List<OutgoingPacket> expiredPackets = udpClient.NeedAcks.GetExpiredPackets(udpClient.RTO); 391 List<OutgoingPacket> expiredPackets = udpClient.NeedAcks.GetExpiredPackets(udpClient.RTO);
389 392
390 if (expiredPackets != null) 393 if (expiredPackets != null)
391 { 394 {
395 m_log.Debug("[LLUDPSERVER]: Resending " + expiredPackets.Count + " packets to " + udpClient.AgentID);
396
392 // Resend packets 397 // Resend packets
393 for (int i = 0; i < expiredPackets.Count; i++) 398 for (int i = 0; i < expiredPackets.Count; i++)
394 { 399 {