summaryrefslogtreecommitdiffstats
path: root/module/network/Bucket.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-30 00:00:23 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-30 00:00:23 +0100
commitad8d7b544ba46f17096eba2828a99ea56a117bc0 (patch)
tree628dc1f723559185763edc90c5a460306266ad4d /module/network/Bucket.py
parentMU free fixed (diff)
downloadpyload-ad8d7b544ba46f17096eba2828a99ea56a117bc0.tar.xz
improved performance for wlan
Diffstat (limited to 'module/network/Bucket.py')
-rw-r--r--module/network/Bucket.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/network/Bucket.py b/module/network/Bucket.py
index 1a2d77409..69da277ae 100644
--- a/module/network/Bucket.py
+++ b/module/network/Bucket.py
@@ -26,7 +26,10 @@ class Bucket:
self.tokens = 0
self.timestamp = time()
self.lock = Lock()
-
+
+ def __nonzero__(self):
+ return False if self.rate < 10240 else True
+
def setRate(self, rate):
self.lock.acquire()
self.rate = int(rate)