diff --git a/swift/common/internal_client.py b/swift/common/internal_client.py index d23e76026f..b0fda5f2b1 100644 --- a/swift/common/internal_client.py +++ b/swift/common/internal_client.py @@ -178,7 +178,9 @@ class InternalClient(object): return resp except (Exception, Timeout): exc_type, exc_value, exc_traceback = exc_info() - sleep(2 ** (attempt + 1)) + # sleep only between tries, not after each one + if attempt < self.request_tries - 1: + sleep(2 ** (attempt + 1)) if resp: raise UnexpectedResponse( _('Unexpected response: %s') % resp.status, resp)