The times of retrying is not correct

The times of retrying was 'max_retries' plus 1 which is fixed now.
This commit is contained in:
Lemon Shi 2022-01-22 11:40:38 +00:00 committed by Asif Saif Uddin
parent a7355ac442
commit 5bed2a8f98
1 changed files with 1 additions and 1 deletions

View File

@ -529,7 +529,7 @@ class Connection:
# the error if it persists after a new connection
# was successfully established.
raise
if max_retries is not None and retries > max_retries:
if max_retries is not None and retries >= max_retries:
raise
self._debug('ensure connection error: %r',
exc, exc_info=1)