summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proxy.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/proxy.py b/proxy.py
index a22a9cc..0fbb199 100644
--- a/proxy.py
+++ b/proxy.py
@@ -128,24 +128,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 >"