Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Update aioredis/client.py
Browse files Browse the repository at this point in the history
Co-authored-by: Bruce Merry <1963944+bmerry@users.noreply.github.com>
  • Loading branch information
Andrew-Chen-Wang and bmerry authored Nov 22, 2021
1 parent 4097b1e commit 5e0ceea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aioredis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4047,9 +4047,11 @@ async def parse_response(self, block: bool = True, timeout: float = 0):
return None
response = await self._execute(conn, conn.read_response)

# The response depends on whether there were any subscriptions
# active at the time the PING was issued.
if conn.health_check_interval and response in (
self.health_check_response,
self.health_check_message_b,
self.health_check_response, # If there was at least one subscription
self.health_check_message_b, # If there wasn't
):
# ignore the health check message as user might not expect it
return None
Expand Down

0 comments on commit 5e0ceea

Please sign in to comment.