diff options
Diffstat (limited to 'redis/retry.py')
| -rw-r--r-- | redis/retry.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/redis/retry.py b/redis/retry.py index 6147fbd..3dced35 100644 --- a/redis/retry.py +++ b/redis/retry.py @@ -1,3 +1,4 @@ +import socket from time import sleep from redis.exceptions import ConnectionError, TimeoutError @@ -7,7 +8,10 @@ class Retry: """Retry a specific number of times after a failure""" def __init__( - self, backoff, retries, supported_errors=(ConnectionError, TimeoutError) + self, + backoff, + retries, + supported_errors=(ConnectionError, TimeoutError, socket.timeout), ): """ Initialize a `Retry` object with a `Backoff` object |
