async def check_health(self):
        """Check the health of the connection with a PING/PONG"""
        if (
            self.health_check_interval
            and asyncio.get_event_loop().time() > self.next_health_check
        ):
            try:
                await self.send_command("PING", check_health=False)
                if str_if_bytes(await self.read_response()) != "PONG":
                    raise ConnectionError("Bad response from PING health check")
            except (ConnectionError, TimeoutError) as err:
                await self.disconnect()
                try:
                    await self.send_command("PING", check_health=False)
                    if str_if_bytes(await self.read_response()) != "PONG":
                        raise ConnectionError(
                            "Bad response from PING health check"
                        ) from None
                except BaseException as err2:
                    raise err2 from err
Check the health of the connection with a PING/PONG
aioredis/connection.py