Skip to content
6 changes: 5 additions & 1 deletion redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,11 @@ async def on_connect(self) -> None:
self._parser.on_connect(self)
if len(auth_args) == 1:
auth_args = ["default", auth_args[0]]
await self.send_command("HELLO", self.protocol, "AUTH", *auth_args)
# avoid checking health here -- PING will fail if we try
# to check the health prior to the AUTH
await self.send_command(
"HELLO", self.protocol, "AUTH", *auth_args, check_health=False
)
response = await self.read_response()
if response.get(b"proto") != int(self.protocol) and response.get(
"proto"
Expand Down
6 changes: 5 additions & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,11 @@ def on_connect(self):
self._parser.on_connect(self)
if len(auth_args) == 1:
auth_args = ["default", auth_args[0]]
self.send_command("HELLO", self.protocol, "AUTH", *auth_args)
# avoid checking health here -- PING will fail if we try
# to check the health prior to the AUTH
self.send_command(
"HELLO", self.protocol, "AUTH", *auth_args, check_health=False
)
self.handshake_metadata = self.read_response()
# if response.get(b"proto") != self.protocol and response.get(
# "proto"
Expand Down
Loading