diff options
author | IƱaki Ucar <iucar@fedoraproject.org> | 2022-01-10 12:20:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 13:20:20 +0200 |
commit | 41cef4703a9e23af72040966a9411ee55d92d917 (patch) | |
tree | ae61ab41924934ecc2d3ec50f925305677bddd22 | |
parent | 9a8674a94740cd299e5c852fd3d9b9841995b1a5 (diff) | |
download | redis-py-41cef4703a9e23af72040966a9411ee55d92d917.tar.gz |
get_connection: catch OSError too (#1832)
-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 8fdb4bd..4178f67 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -1317,7 +1317,7 @@ class ConnectionPool: try: if connection.can_read(): raise ConnectionError("Connection has data") - except ConnectionError: + except (ConnectionError, OSError): connection.disconnect() connection.connect() if connection.can_read(): |