From 3ee06e0857618c43dda0f90ed770d67f58b291bc Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 12 Mar 2010 20:23:46 +0100 Subject: commit --- proxy.py | 12 ++++++------ 1 file 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 "" -- cgit v1.2.1