diff options
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 |