diff options
author | Justin Clark-Casey (justincc) | 2015-01-21 20:31:42 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2015-01-21 20:31:42 +0000 |
commit | 155da5aad2dc0bb6d88d7276e9e3a12639cf9ead (patch) | |
tree | f636762ca16f14c1941f53abf3285200dc583413 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |
parent | Fix OfflineIMEmail value overwriting every time its called. The request was r... (diff) | |
download | opensim-SC-155da5aad2dc0bb6d88d7276e9e3a12639cf9ead.zip opensim-SC-155da5aad2dc0bb6d88d7276e9e3a12639cf9ead.tar.gz opensim-SC-155da5aad2dc0bb6d88d7276e9e3a12639cf9ead.tar.bz2 opensim-SC-155da5aad2dc0bb6d88d7276e9e3a12639cf9ead.tar.xz |
Add debug ability to ignore reliably sent packets that are not acknowledged.
This is controlled via the console command "debug lludp client set process-unacked-sends true [<avatar-first-name> <avatar-last-name>]"
For debug purposes to see if this process for very bad connections is causing general outbound udp processing delays.
Relates to http://opensimulator.org/mantis/view.php?id=7393
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 4fec91f..ad83b42 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -1137,7 +1137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1137 | Utils.UIntToBytesBig(sequenceNumber, buffer.Data, 1); | 1137 | Utils.UIntToBytesBig(sequenceNumber, buffer.Data, 1); |
1138 | outgoingPacket.SequenceNumber = sequenceNumber; | 1138 | outgoingPacket.SequenceNumber = sequenceNumber; |
1139 | 1139 | ||
1140 | if (isReliable) | 1140 | if (udpClient.ProcessUnackedSends && isReliable) |
1141 | { | 1141 | { |
1142 | // Add this packet to the list of ACK responses we are waiting on from the server | 1142 | // Add this packet to the list of ACK responses we are waiting on from the server |
1143 | udpClient.NeedAcks.Add(outgoingPacket); | 1143 | udpClient.NeedAcks.Add(outgoingPacket); |
@@ -1325,30 +1325,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1325 | 1325 | ||
1326 | #region ACK Receiving | 1326 | #region ACK Receiving |
1327 | 1327 | ||
1328 | // Handle appended ACKs | 1328 | if (udpClient.ProcessUnackedSends) |
1329 | if (packet.Header.AppendedAcks && packet.Header.AckList != null) | ||
1330 | { | 1329 | { |
1331 | // m_log.DebugFormat( | 1330 | // Handle appended ACKs |
1332 | // "[LLUDPSERVER]: Handling {0} appended acks from {1} in {2}", | 1331 | if (packet.Header.AppendedAcks && packet.Header.AckList != null) |
1333 | // packet.Header.AckList.Length, client.Name, m_scene.Name); | 1332 | { |
1333 | // m_log.DebugFormat( | ||
1334 | // "[LLUDPSERVER]: Handling {0} appended acks from {1} in {2}", | ||
1335 | // packet.Header.AckList.Length, client.Name, m_scene.Name); | ||
1334 | 1336 | ||
1335 | for (int i = 0; i < packet.Header.AckList.Length; i++) | 1337 | for (int i = 0; i < packet.Header.AckList.Length; i++) |
1336 | udpClient.NeedAcks.Acknowledge(packet.Header.AckList[i], now, packet.Header.Resent); | 1338 | udpClient.NeedAcks.Acknowledge(packet.Header.AckList[i], now, packet.Header.Resent); |
1337 | } | 1339 | } |
1338 | 1340 | ||
1339 | // Handle PacketAck packets | 1341 | // Handle PacketAck packets |
1340 | if (packet.Type == PacketType.PacketAck) | 1342 | if (packet.Type == PacketType.PacketAck) |
1341 | { | 1343 | { |
1342 | PacketAckPacket ackPacket = (PacketAckPacket)packet; | 1344 | PacketAckPacket ackPacket = (PacketAckPacket)packet; |
1343 | 1345 | ||
1344 | // m_log.DebugFormat( | 1346 | // m_log.DebugFormat( |
1345 | // "[LLUDPSERVER]: Handling {0} packet acks for {1} in {2}", | 1347 | // "[LLUDPSERVER]: Handling {0} packet acks for {1} in {2}", |
1346 | // ackPacket.Packets.Length, client.Name, m_scene.Name); | 1348 | // ackPacket.Packets.Length, client.Name, m_scene.Name); |
1347 | 1349 | ||
1348 | for (int i = 0; i < ackPacket.Packets.Length; i++) | 1350 | for (int i = 0; i < ackPacket.Packets.Length; i++) |
1349 | udpClient.NeedAcks.Acknowledge(ackPacket.Packets[i].ID, now, packet.Header.Resent); | 1351 | udpClient.NeedAcks.Acknowledge(ackPacket.Packets[i].ID, now, packet.Header.Resent); |
1350 | 1352 | ||
1351 | // We don't need to do anything else with PacketAck packets | 1353 | // We don't need to do anything else with PacketAck packets |
1354 | return; | ||
1355 | } | ||
1356 | } | ||
1357 | else if (packet.Type == PacketType.PacketAck) | ||
1358 | { | ||
1352 | return; | 1359 | return; |
1353 | } | 1360 | } |
1354 | 1361 | ||
@@ -2011,7 +2018,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2011 | 2018 | ||
2012 | if (udpClient.IsConnected) | 2019 | if (udpClient.IsConnected) |
2013 | { | 2020 | { |
2014 | if (m_resendUnacked) | 2021 | if (udpClient.ProcessUnackedSends && m_resendUnacked) |
2015 | HandleUnacked(llClient); | 2022 | HandleUnacked(llClient); |
2016 | 2023 | ||
2017 | if (m_sendAcks) | 2024 | if (m_sendAcks) |