* 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
This commit is contained in:
John Hurliman
2009-10-21 13:47:16 -07:00
parent 9178537e94
commit 7ee422a344
3 changed files with 49 additions and 13 deletions

View File

@@ -85,6 +85,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="sequenceNumber">Sequence number of the packet to
/// acknowledge</param>
/// <param name="currentTime">Current value of Environment.TickCount</param>
/// <remarks>This does not immediately acknowledge the packet, it only
/// queues the ack so it can be handled in a thread-safe way later</remarks>
public void Remove(uint sequenceNumber, int currentTime, bool fromResend)
{
m_pendingRemoves.Enqueue(new PendingAck(sequenceNumber, currentTime, fromResend));
@@ -108,7 +110,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_packets.Count > 0)
{
int now = Environment.TickCount;
int now = Environment.TickCount & Int32.MaxValue;
foreach (OutgoingPacket packet in m_packets.Values)
{
@@ -123,10 +125,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
expiredPackets = new List<OutgoingPacket>();
expiredPackets.Add(packet);
}
else
/*else
{
break;
}
}*/
}
}