From 40cb83b555c7ec105128a6c4022301d1bbb4c9db Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 10 Nov 2015 22:50:20 +0000
Subject: make m_minimumDripRate a bit larger than mtu. Add a bucket space
check that does not consume avaiable space, so reducing bandwidth
---
OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
index f769383..0f71222 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
///
- protected const float m_minimumDripRate = 1400;
+ protected const float m_minimumDripRate = 1500;
/// Time of the last drip, in system ticks
protected Int32 m_lastDrip;
@@ -286,6 +286,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return false;
}
+ public bool CheckTokens(int amount)
+ {
+ return (m_tokenCount - amount >= 0);
+ }
+
public int GetCatBytesCanSend(int timeMS)
{
// return (int)(m_tokenCount + timeMS * m_dripRate * 1e-3);
--
cgit v1.1