Skip to content

Commit

Permalink
fix (#2799)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h authored Jun 14, 2023
1 parent 5f49e05 commit e13b239
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ async def read_response(
try:
if (
read_timeout is not None
and self.protocol == "3"
and self.protocol in ["3", 3]
and not HIREDIS_AVAILABLE
):
async with async_timeout(read_timeout):
Expand All @@ -526,7 +526,7 @@ async def read_response(
response = await self._parser.read_response(
disable_decoding=disable_decoding
)
elif self.protocol == "3" and not HIREDIS_AVAILABLE:
elif self.protocol in ["3", 3] and not HIREDIS_AVAILABLE:
response = await self._parser.read_response(
disable_decoding=disable_decoding, push_request=push_request
)
Expand Down
2 changes: 1 addition & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def read_response(self, disable_decoding=False, push_request=False):
host_error = self._host_error()

try:
if self.protocol == "3" and not HIREDIS_AVAILABLE:
if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE:
response = self._parser.read_response(
disable_decoding=disable_decoding, push_request=push_request
)
Expand Down

0 comments on commit e13b239

Please sign in to comment.