diff options
author | yvesf <yvesf@aurora.xapek.org> | 2010-03-12 20:23:46 +0100 |
---|---|---|
committer | yvesf <yvesf@aurora.xapek.org> | 2010-03-12 20:23:46 +0100 |
commit | 3ee06e0857618c43dda0f90ed770d67f58b291bc (patch) | |
tree | 8c3596c40f6aceea3ec2e9be3ad459fe8cadee88 /proxy.py | |
parent | 8505f1972a5ed811e96cde5b08a47fbc162926fa (diff) | |
download | magicproxy-3ee06e0857618c43dda0f90ed770d67f58b291bc.tar.gz magicproxy-3ee06e0857618c43dda0f90ed770d67f58b291bc.zip |
commit
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 >" |