Skip to content

Commit

Permalink
sync: use backoff/retry on all kinds of IO errors
Browse files Browse the repository at this point in the history
  • Loading branch information
d70-t committed Jun 20, 2023
1 parent a40d5bc commit d4bba95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ipfsspec/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def get(self, path):
logger.debug("get %s via %s", path, self.url)
try:
res = self.session.get(self.url + "/ipfs/" + path)
except requests.ConnectionError as e:
logger.debug("Connection Error: %s", e)
except IOError as e:
logger.debug("IOError: %s", e)
self._backoff()
return None
# this is from https://blog.petrzemek.net/2018/04/22/on-incomplete-http-reads-and-the-requests-library-in-python/
Expand Down

0 comments on commit d4bba95

Please sign in to comment.