Skip to content

Commit bfc4cd9

Browse files
authored
Auto-reconnect PubSub on get_message (#1574)
1 parent 799c139 commit bfc4cd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redis/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,10 @@ def parse_response(self, block=True, timeout=0):
12591259

12601260
self.check_health()
12611261

1262-
if not block and not conn.can_read(timeout=timeout):
1262+
if(
1263+
not block
1264+
and not self._execute(conn, conn.can_read, timeout=timeout)
1265+
):
12631266
return None
12641267
response = self._execute(conn, conn.read_response)
12651268

0 commit comments

Comments
 (0)