get_connection: catch OSError too
@@ -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():
