~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/smart.py

Update SmartClientRequestProtocolOne.read_body_bytes to use next_read_size.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1504
1504
        _body_decoder = LengthPrefixedBodyDecoder()
1505
1505
 
1506
1506
        while not _body_decoder.finished_reading:
1507
 
            bytes_wanted = _body_decoder.bytes_left
1508
 
            if bytes_wanted is None:
1509
 
                bytes_wanted = 1
 
1507
            bytes_wanted = _body_decoder.next_read_size()
1510
1508
            bytes = self._request.read_bytes(bytes_wanted)
1511
1509
            _body_decoder.accept_bytes(bytes)
1512
1510
        self._request.finished_reading()