Comment 20 for bug 720707

Revision history for this message
Stuart Bishop (stub) wrote :

Back to comment #1, wouldn't this implementation solve the bug?

def write(self, data):
    """Transport API to capture bytes written."""
    chunk_size = 1024*1024
    data_len = len(data)
    index = 0
    while index < data_len:
        if self.factory.client is self:
            self.factory.registerWritten(len(data[index:index+chunk_size]))
        StorageClient.write(self, data[index:index + chunk_size])
        index += chunk_size