Skip to content

Commit e13b239

Browse files
authored
fix (#2799)
1 parent 5f49e05 commit e13b239

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

redis/asyncio/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ async def read_response(
514514
try:
515515
if (
516516
read_timeout is not None
517-
and self.protocol == "3"
517+
and self.protocol in ["3", 3]
518518
and not HIREDIS_AVAILABLE
519519
):
520520
async with async_timeout(read_timeout):
@@ -526,7 +526,7 @@ async def read_response(
526526
response = await self._parser.read_response(
527527
disable_decoding=disable_decoding
528528
)
529-
elif self.protocol == "3" and not HIREDIS_AVAILABLE:
529+
elif self.protocol in ["3", 3] and not HIREDIS_AVAILABLE:
530530
response = await self._parser.read_response(
531531
disable_decoding=disable_decoding, push_request=push_request
532532
)

redis/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def read_response(self, disable_decoding=False, push_request=False):
433433
host_error = self._host_error()
434434

435435
try:
436-
if self.protocol == "3" and not HIREDIS_AVAILABLE:
436+
if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE:
437437
response = self._parser.read_response(
438438
disable_decoding=disable_decoding, push_request=push_request
439439
)

0 commit comments

Comments
 (0)