Catch OSError in BlockingConnectionPool.get_connection
@@ -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():
