summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryvesf <yvesf@aurora.xapek.org>2010-03-12 20:23:46 +0100
committeryvesf <yvesf@aurora.xapek.org>2010-03-12 20:23:46 +0100
commit3ee06e0857618c43dda0f90ed770d67f58b291bc (patch)
tree8c3596c40f6aceea3ec2e9be3ad459fe8cadee88
parent8505f1972a5ed811e96cde5b08a47fbc162926fa (diff)
downloadmagicproxy-3ee06e0857618c43dda0f90ed770d67f58b291bc.tar.gz
magicproxy-3ee06e0857618c43dda0f90ed770d67f58b291bc.zip
commit
-rw-r--r--proxy.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/proxy.py b/proxy.py
index d4cf892..c045bbd 100644
--- a/proxy.py
+++ b/proxy.py
@@ -122,24 +122,24 @@ class MultipleProxyReader(object):
self.next_endpoint = (self.next_endpoint+1) % len(ENDPOINTS)
def find_next_data(self):
-
if not self.channel.writeable(): # request-side closed the connection
self.channel.close_when_done()
+ #XXX terminate all running fetcher
return False
- r = False
- #print "expect at %s" % self.write_pos, self.blocks.keys()
+ #print self, "expect at %s" % self.write_pos, self.blocks.keys()
if self.write_pos in self.blocks.keys():
r=True
data = self.blocks.pop(self.write_pos)
self.channel.push(data)
self.write_pos += len(data)
- #print "Send %s bytes" % len(data)
+ return True
if self.write_pos + 1 >= self.content_length:
- print self, "done"
+ print self, "job done"
self.channel.close_when_done()
- return r
+
+ return False
def __str__(self):
return "<MultipleProxyReader >"