/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/smart/client.py

Merge in the stream retry code, and update for the slightly newer apis.

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
            # Connection is dead, so close our end of it.
274
274
            self.client._medium.reset()
275
275
            if (('noretry' in debug.debug_flags)
276
 
                or self.body_stream is not None):
 
276
                or (self.body_stream is not None
 
277
                    and encoder.body_stream_started)):
277
278
                # We can't restart a body_stream that has been partially
278
279
                # consumed, so we don't retry.
 
280
                # Note: We don't have to worry about
 
281
                #   SmartClientRequestProtocolOne or Two, because they don't
 
282
                #   support client-side body streams.
279
283
                raise
280
284
            trace.warning('ConnectionReset calling %r, retrying'
281
285
                          % (self.method,))