summaryrefslogtreecommitdiff
path: root/proxy.py
diff options
context:
space:
mode:
authorThomas Keck <thomas@macbook.macbook>2010-03-13 17:35:28 +0100
committerThomas Keck <thomas@macbook.macbook>2010-03-13 17:35:28 +0100
commit9b0ffb71e5b47fff2095c24551b9e0fce4c0650e (patch)
treeb5f273c83e70bb79ccecf5e8b8d4d5501d03e3a5 /proxy.py
parentce35065f0b12f509dea6940bbf3794fb80ffa403 (diff)
downloadmagicproxy-9b0ffb71e5b47fff2095c24551b9e0fce4c0650e.tar.gz
magicproxy-9b0ffb71e5b47fff2095c24551b9e0fce4c0650e.zip
Min/Max mistake at blocksize calculation
Diffstat (limited to 'proxy.py')
-rwxr-xr-xproxy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/proxy.py b/proxy.py
index 99793a8..ffd09a0 100755
--- a/proxy.py
+++ b/proxy.py
@@ -136,7 +136,7 @@ class MultipleProxyReader(object):
and self.fetch_pos + 1 < self.content_length and not self.channel.is_closed \
and len( filter( (lambda f: f.proxy == fetcher.proxy), self.fetchers) ) < 2:
#Start a new fetcher on this line if this fetchers is X-Bytes before finishing his jobs
- blocksize = min(int(TIME_SLICE * fetcher.speed()), MIN_BLOCKSIZE)
+ blocksize = max(int(TIME_SLICE * fetcher.speed()), MIN_BLOCKSIZE)
fetch_range = self.next_range(blocksize)
print "Start new Fetcher, bs=%s range=%s" % (blocksize,fetch_range)
self.fetchers.append( Fetcher(self, fetcher.proxy, self.url, self.header, fetch_range) )