diff options
author | Éric Lemoine <eric.lemoine@gmail.com> | 2022-02-22 12:32:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 13:32:14 +0200 |
commit | 1983905d5adceaba2c3b27ba8f569dcb5387cc35 (patch) | |
tree | bb25ef02cc725ae9e1f890e6a3013a01bfdc792e /redis/connection.py | |
parent | fa76ac49a9ea02c204bd4f1644f39d90140cf356 (diff) | |
download | redis-py-1983905d5adceaba2c3b27ba8f569dcb5387cc35.tar.gz |
Catch OSError in BlockingConnectionPool.get_connection (#2001)
Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-x | redis/connection.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/connection.py b/redis/connection.py index 189cecb..8a77e4b 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -1577,7 +1577,7 @@ class BlockingConnectionPool(ConnectionPool): try: if connection.can_read(): raise ConnectionError("Connection has data") - except ConnectionError: + except (ConnectionError, OSError): connection.disconnect() connection.connect() if connection.can_read(): |