diff options
author | 2010-12-19 21:09:08 +0100 | |
---|---|---|
committer | 2010-12-19 21:09:08 +0100 | |
commit | 75777c1089ce1fd2d25865442707f1facf53e8c5 (patch) | |
tree | c7e1403c76e916d8eef6e3b5bf66c5e20746ee1c /module/network/HTTPChunk.py | |
parent | new network backend: xdcc support (diff) | |
download | pyload-75777c1089ce1fd2d25865442707f1facf53e8c5.tar.xz |
bucket improvement
Diffstat (limited to 'module/network/HTTPChunk.py')
-rw-r--r-- | module/network/HTTPChunk.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index c7d981880..0c87283f1 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -19,7 +19,6 @@ from HTTPBase import HTTPBase from urllib2 import HTTPError -from threading import Lock from helper import * from time import sleep from traceback import print_exc @@ -76,8 +75,8 @@ class HTTPChunk(HTTPBase): if self.noRangeHeader: count = min(count, self.range[1] - self.arrived) if self.bucket: - allow = self.bucket.consume(count) - if not allow: + count = self.bucket.add(count) + if not count: sleep(0.01) continue |