Skip to content

Commit 23fd884

Browse files
authored
fix: fix a dedicated method for watch to be the same manner as the multi method (#342)
1 parent 735b529 commit 23fd884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/redis_client/cluster/router.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ def send_pubsub_command(method, command, args, &block) # rubocop:disable Metrics
315315
def send_watch_command(command)
316316
raise ::RedisClient::Cluster::Transaction::ConsistencyError, 'A block required. And you need to use the block argument as a client for the transaction.' unless block_given?
317317

318-
::RedisClient::Cluster::OptimisticLocking.new(self).watch(command[1..]) do |c, slot|
318+
::RedisClient::Cluster::OptimisticLocking.new(self).watch(command[1..]) do |c, slot, asking|
319319
transaction = ::RedisClient::Cluster::Transaction.new(
320-
self, @command_builder, node: c, slot: slot
320+
self, @command_builder, node: c, slot: slot, asking: asking
321321
)
322322
yield transaction
323323
transaction.execute

0 commit comments

Comments
 (0)