From e096b49dd7f265dbe5f5386b745670bfbdc1ee2b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 10 Nov 2015 23:17:56 +0000 Subject: check if a packet can be sent imediatly without accounting it as sent on throttles when it is enqueued for later send. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden') 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 return true; } - if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength)) + if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength)) { // enough tokens so it can be sent imediatly by caller + bucket.RemoveTokens(packet.Buffer.DataLength); return false; } else @@ -605,6 +606,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // We don't have a token bucket for this category, so it will not be queued return false; } + } /// -- cgit v1.1