diff options
author | Mic Bowman | 2011-04-15 16:44:53 -0700 |
---|---|---|
committer | Mic Bowman | 2011-04-15 16:44:53 -0700 |
commit | 3e0e1057acffa2c92a6f949cef0183193033d8c2 (patch) | |
tree | d699aa06b4c39aa10bed98a83b1641cd5bf183e8 /OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |
parent | Merge branch 'master' into queuetest (diff) | |
download | opensim-SC_OLD-3e0e1057acffa2c92a6f949cef0183193033d8c2.zip opensim-SC_OLD-3e0e1057acffa2c92a6f949cef0183193033d8c2.tar.gz opensim-SC_OLD-3e0e1057acffa2c92a6f949cef0183193033d8c2.tar.bz2 opensim-SC_OLD-3e0e1057acffa2c92a6f949cef0183193033d8c2.tar.xz |
Remove the call to remove tokens from the parent. Under heavy load
this appears to cause problems with the system timer resolution.
This caused a problem with tokens going into the root throttle as
bursts leading to some starvation.
Also changed EnqueueOutgoing to always queue a packet if there
are already packets in the queue. Ensures consistent ordering
of packet sends.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index 5a69851..7be8a0a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |||
@@ -440,6 +440,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
440 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; | 440 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; |
441 | TokenBucket bucket = m_throttleCategories[category]; | 441 | TokenBucket bucket = m_throttleCategories[category]; |
442 | 442 | ||
443 | // Don't send this packet if there is already a packet waiting in the queue | ||
444 | // even if we have the tokens to send it, tokens should go to the already | ||
445 | // queued packets | ||
446 | if (queue.Count > 0) | ||
447 | { | ||
448 | queue.Enqueue(packet); | ||
449 | return true; | ||
450 | } | ||
451 | |||
452 | |||
443 | if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) | 453 | if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) |
444 | { | 454 | { |
445 | // Enough tokens were removed from the bucket, the packet will not be queued | 455 | // Enough tokens were removed from the bucket, the packet will not be queued |