diff options
author | UbitUmarov | 2015-11-10 22:50:20 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-10 22:50:20 +0000 |
commit | 40cb83b555c7ec105128a6c4022301d1bbb4c9db (patch) | |
tree | 6e76f24ed33f4df701187f38adb5da07152071ac | |
parent | fix silly bug (diff) | |
download | opensim-SC-40cb83b555c7ec105128a6c4022301d1bbb4c9db.zip opensim-SC-40cb83b555c7ec105128a6c4022301d1bbb4c9db.tar.gz opensim-SC-40cb83b555c7ec105128a6c4022301d1bbb4c9db.tar.bz2 opensim-SC-40cb83b555c7ec105128a6c4022301d1bbb4c9db.tar.xz |
make m_minimumDripRate a bit larger than mtu. Add a bucket space check that does not consume avaiable space, so reducing bandwidth
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | 7 |
1 files changed, 6 insertions, 1 deletions
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 | |||
60 | 60 | ||
61 | /// <summary> | 61 | /// <summary> |
62 | /// </summary> | 62 | /// </summary> |
63 | protected const float m_minimumDripRate = 1400; | 63 | protected const float m_minimumDripRate = 1500; |
64 | 64 | ||
65 | /// <summary>Time of the last drip, in system ticks</summary> | 65 | /// <summary>Time of the last drip, in system ticks</summary> |
66 | protected Int32 m_lastDrip; | 66 | protected Int32 m_lastDrip; |
@@ -286,6 +286,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
286 | return false; | 286 | return false; |
287 | } | 287 | } |
288 | 288 | ||
289 | public bool CheckTokens(int amount) | ||
290 | { | ||
291 | return (m_tokenCount - amount >= 0); | ||
292 | } | ||
293 | |||
289 | public int GetCatBytesCanSend(int timeMS) | 294 | public int GetCatBytesCanSend(int timeMS) |
290 | { | 295 | { |
291 | // return (int)(m_tokenCount + timeMS * m_dripRate * 1e-3); | 296 | // return (int)(m_tokenCount + timeMS * m_dripRate * 1e-3); |