Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions redis/asyncio/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2350,10 +2350,11 @@ async def reset(self):
# watching something
if self._transaction_connection:
try:
# call this manually since our unwatch or
# immediate_execute_command methods can call reset()
await self._transaction_connection.send_command("UNWATCH")
await self._transaction_connection.read_response()
if self._watching:
# call this manually since our unwatch or
# immediate_execute_command methods can call reset()
await self._transaction_connection.send_command("UNWATCH")
await self._transaction_connection.read_response()
# we can safely return the connection to the pool here since we're
# sure we're no longer WATCHing anything
self._transaction_node.release(self._transaction_connection)
Expand Down
9 changes: 5 additions & 4 deletions redis/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3289,10 +3289,11 @@ def reset(self):
# watching something
if self._transaction_connection:
try:
# call this manually since our unwatch or
# immediate_execute_command methods can call reset()
self._transaction_connection.send_command("UNWATCH")
self._transaction_connection.read_response()
if self._watching:
# call this manually since our unwatch or
# immediate_execute_command methods can call reset()
self._transaction_connection.send_command("UNWATCH")
self._transaction_connection.read_response()
# we can safely return the connection to the pool here since we're
# sure we're no longer WATCHing anything
node = self._nodes_manager.find_connection_owner(
Expand Down
Loading