File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -2350,10 +2350,11 @@ async def reset(self):
23502350 # watching something
23512351 if self ._transaction_connection :
23522352 try :
2353- # call this manually since our unwatch or
2354- # immediate_execute_command methods can call reset()
2355- await self ._transaction_connection .send_command ("UNWATCH" )
2356- await self ._transaction_connection .read_response ()
2353+ if self ._watching :
2354+ # call this manually since our unwatch or
2355+ # immediate_execute_command methods can call reset()
2356+ await self ._transaction_connection .send_command ("UNWATCH" )
2357+ await self ._transaction_connection .read_response ()
23572358 # we can safely return the connection to the pool here since we're
23582359 # sure we're no longer WATCHing anything
23592360 self ._transaction_node .release (self ._transaction_connection )
Original file line number Diff line number Diff line change @@ -3289,10 +3289,11 @@ def reset(self):
32893289 # watching something
32903290 if self ._transaction_connection :
32913291 try :
3292- # call this manually since our unwatch or
3293- # immediate_execute_command methods can call reset()
3294- self ._transaction_connection .send_command ("UNWATCH" )
3295- self ._transaction_connection .read_response ()
3292+ if self ._watching :
3293+ # call this manually since our unwatch or
3294+ # immediate_execute_command methods can call reset()
3295+ self ._transaction_connection .send_command ("UNWATCH" )
3296+ self ._transaction_connection .read_response ()
32963297 # we can safely return the connection to the pool here since we're
32973298 # sure we're no longer WATCHing anything
32983299 node = self ._nodes_manager .find_connection_owner (
You can’t perform that action at this time.
0 commit comments