Skip to content

Commit

Permalink
Feat: retries connection-related ClientError types (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
carshadi authored Mar 12, 2024
1 parent 0fbefba commit 47ffcfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ async def _error_wrapper(func, *, args=(), kwargs=None, retries):
err = e
if "SlowDown" in str(e):
await asyncio.sleep(min(1.7**i * 0.1, 15))
elif "XAmzContentSHA256Mismatch" in str(e):
await asyncio.sleep(min(1.7**i * 0.1, 15))
else:
break
except Exception as e:
Expand Down

0 comments on commit 47ffcfa

Please sign in to comment.