diff options
Diffstat (limited to 'proxy.py')
-rw-r--r-- | proxy.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 >" |