From 477a869fb2cc615430d78cbad6a5a0eedf6b9bf8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 9 Feb 2011 08:08:57 -0800 Subject: [PATCH] More detection of negatives. --- OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs index dd526830a3..de8b521b67 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs @@ -213,6 +213,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP content = Math.Min(content + dripAmount, maxBurst); lastDrip = now; + if (content < 0) + Console.WriteLine("MAY DAY MAY DAY! Content is " + content + ". This should not happen"); + return true; } }