Skip to content

Commit

Permalink
add "disconnect_on_error" argument to SentinelManagedConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed May 8, 2023
1 parent 3651506 commit 0951770
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions redis/asyncio/sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ async def read_response(
self,
disable_decoding: bool = False,
timeout: Optional[float] = None,
*,
disconnect_on_error: Optional[float] = True,
):
try:
return await super().read_response(
disable_decoding=disable_decoding,
timeout=timeout,
disconnect_on_error=disconnect_on_error,
)
except ReadOnlyError:
if self.connection_pool.is_master:
Expand Down

0 comments on commit 0951770

Please sign in to comment.