diff options
author | John Hurliman | 2009-10-21 13:47:16 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-21 13:47:16 -0700 |
commit | 7ee422a344ff22cf988aea2355628d2dee831983 (patch) | |
tree | b0ee8d6004b501f940ecfcc2d00a52a74cabfa25 /OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | |
parent | * Replaced the UnackedPacketCollection with a lockless implementation. The ti... (diff) | |
download | opensim-SC_OLD-7ee422a344ff22cf988aea2355628d2dee831983.zip opensim-SC_OLD-7ee422a344ff22cf988aea2355628d2dee831983.tar.gz opensim-SC_OLD-7ee422a344ff22cf988aea2355628d2dee831983.tar.bz2 opensim-SC_OLD-7ee422a344ff22cf988aea2355628d2dee831983.tar.xz |
* Handle UseCircuitCode packets asynchronously. Adding an agent to a scene can take several seconds, and was blocking up packet handling in the meantime
* Clamp retransmission timeout values between three and 10 seconds
* Log outgoing time for a packet right after it is sent instead of well before
* Loop through the entire UnackedPacketCollection when looking for expired packets
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 12f0c0a..bd5fe1c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | |||
@@ -85,6 +85,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
85 | /// <param name="sequenceNumber">Sequence number of the packet to | 85 | /// <param name="sequenceNumber">Sequence number of the packet to |
86 | /// acknowledge</param> | 86 | /// acknowledge</param> |
87 | /// <param name="currentTime">Current value of Environment.TickCount</param> | 87 | /// <param name="currentTime">Current value of Environment.TickCount</param> |
88 | /// <remarks>This does not immediately acknowledge the packet, it only | ||
89 | /// queues the ack so it can be handled in a thread-safe way later</remarks> | ||
88 | public void Remove(uint sequenceNumber, int currentTime, bool fromResend) | 90 | public void Remove(uint sequenceNumber, int currentTime, bool fromResend) |
89 | { | 91 | { |
90 | m_pendingRemoves.Enqueue(new PendingAck(sequenceNumber, currentTime, fromResend)); | 92 | m_pendingRemoves.Enqueue(new PendingAck(sequenceNumber, currentTime, fromResend)); |
@@ -108,7 +110,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
108 | 110 | ||
109 | if (m_packets.Count > 0) | 111 | if (m_packets.Count > 0) |
110 | { | 112 | { |
111 | int now = Environment.TickCount; | 113 | int now = Environment.TickCount & Int32.MaxValue; |
112 | 114 | ||
113 | foreach (OutgoingPacket packet in m_packets.Values) | 115 | foreach (OutgoingPacket packet in m_packets.Values) |
114 | { | 116 | { |
@@ -123,10 +125,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
123 | expiredPackets = new List<OutgoingPacket>(); | 125 | expiredPackets = new List<OutgoingPacket>(); |
124 | expiredPackets.Add(packet); | 126 | expiredPackets.Add(packet); |
125 | } | 127 | } |
126 | else | 128 | /*else |
127 | { | 129 | { |
128 | break; | 130 | break; |
129 | } | 131 | }*/ |
130 | } | 132 | } |
131 | } | 133 | } |
132 | 134 | ||