diff options
author | UbitUmarov | 2015-11-10 23:17:56 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-10 23:17:56 +0000 |
commit | e096b49dd7f265dbe5f5386b745670bfbdc1ee2b (patch) | |
tree | 886461575a0ca18f7f6e0bd88fdede95b359d7cc | |
parent | make m_minimumDripRate a bit larger than mtu. Add a bucket space check that ... (diff) | |
download | opensim-SC-e096b49dd7f265dbe5f5386b745670bfbdc1ee2b.zip opensim-SC-e096b49dd7f265dbe5f5386b745670bfbdc1ee2b.tar.gz opensim-SC-e096b49dd7f265dbe5f5386b745670bfbdc1ee2b.tar.bz2 opensim-SC-e096b49dd7f265dbe5f5386b745670bfbdc1ee2b.tar.xz |
check if a packet can be sent imediatly without accounting it as sent on throttles when it is enqueued for later send.
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 8b6f4b6..36e0a0e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -588,9 +588,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
588 | return true; | 588 | return true; |
589 | } | 589 | } |
590 | 590 | ||
591 | if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) | 591 | if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength)) |
592 | { | 592 | { |
593 | // enough tokens so it can be sent imediatly by caller | 593 | // enough tokens so it can be sent imediatly by caller |
594 | bucket.RemoveTokens(packet.Buffer.DataLength); | ||
594 | return false; | 595 | return false; |
595 | } | 596 | } |
596 | else | 597 | else |
@@ -605,6 +606,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
605 | // We don't have a token bucket for this category, so it will not be queued | 606 | // We don't have a token bucket for this category, so it will not be queued |
606 | return false; | 607 | return false; |
607 | } | 608 | } |
609 | |||
608 | } | 610 | } |
609 | 611 | ||
610 | /// <summary> | 612 | /// <summary> |