aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
index 384439c..1877cf0 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
@@ -304,11 +304,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
304 return; 304 return;
305 } 305 }
306 306
307 Int32 deltaMS = Util.EnvironmentTickCountSubtract(m_lastDrip); 307 Int32 now = Util.EnvironmentTickCount();
308 m_lastDrip = Util.EnvironmentTickCount(); 308 Int32 deltaMS = now - m_lastDrip;
309 m_lastDrip = now;
309 310
310 // This can be 0 in the very unusual case that the timer wrapped
311 // It can be 0 if we try add tokens at a sub-tick rate
312 if (deltaMS <= 0) 311 if (deltaMS <= 0)
313 return; 312 return;
314 313