diff --git a/lib/redis_client/cluster/router.rb b/lib/redis_client/cluster/router.rb index 94963d4c..5583e48f 100644 --- a/lib/redis_client/cluster/router.rb +++ b/lib/redis_client/cluster/router.rb @@ -315,9 +315,9 @@ def send_pubsub_command(method, command, args, &block) # rubocop:disable Metrics def send_watch_command(command) 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? - ::RedisClient::Cluster::OptimisticLocking.new(self).watch(command[1..]) do |c, slot| + ::RedisClient::Cluster::OptimisticLocking.new(self).watch(command[1..]) do |c, slot, asking| transaction = ::RedisClient::Cluster::Transaction.new( - self, @command_builder, node: c, slot: slot + self, @command_builder, node: c, slot: slot, asking: asking ) yield transaction transaction.execute