diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs index bdbd284..0a8331f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | |||
@@ -210,6 +210,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
210 | content = Math.Min(content + dripAmount, maxBurst); | 210 | content = Math.Min(content + dripAmount, maxBurst); |
211 | lastDrip = now; | 211 | lastDrip = now; |
212 | 212 | ||
213 | if (dripAmount < 0 || content < 0) | ||
214 | // sim has been idle for too long, integer has overflown | ||
215 | // previous calculation is meaningless, let's put it at correct max | ||
216 | content = maxBurst; | ||
217 | |||
213 | return true; | 218 | return true; |
214 | } | 219 | } |
215 | } | 220 | } |