File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2352,8 +2352,9 @@ async def reset(self):
2352
2352
try :
2353
2353
# call this manually since our unwatch or
2354
2354
# immediate_execute_command methods can call reset()
2355
- await self ._transaction_connection .send_command ("UNWATCH" )
2356
- await self ._transaction_connection .read_response ()
2355
+ if self ._watching :
2356
+ await self ._transaction_connection .send_command ("UNWATCH" )
2357
+ await self ._transaction_connection .read_response ()
2357
2358
# we can safely return the connection to the pool here since we're
2358
2359
# sure we're no longer WATCHing anything
2359
2360
self ._transaction_node .release (self ._transaction_connection )
Original file line number Diff line number Diff line change @@ -3292,8 +3292,9 @@ def reset(self):
3292
3292
try :
3293
3293
# call this manually since our unwatch or
3294
3294
# immediate_execute_command methods can call reset()
3295
- self ._transaction_connection .send_command ("UNWATCH" )
3296
- self ._transaction_connection .read_response ()
3295
+ if self ._watching :
3296
+ self ._transaction_connection .send_command ("UNWATCH" )
3297
+ self ._transaction_connection .read_response ()
3297
3298
# we can safely return the connection to the pool here since we're
3298
3299
# sure we're no longer WATCHing anything
3299
3300
node = self ._nodes_manager .find_connection_owner (
You can’t perform that action at this time.
0 commit comments