Skip to content

Commit ff5e4da

Browse files
author
NguyenDucTung
committed
Fix error "No sentinels available" when the master name is different from the host name
1 parent 98e3e7a commit ff5e4da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def initialize(options)
493493

494494
@sentinels = @options.delete(:sentinels).dup
495495
@role = @options.fetch(:role, "master").to_s
496-
@master = @options[:host]
496+
@master = @options[:master_name] || @options[:host]
497497
end
498498

499499
def check(client)

0 commit comments

Comments
 (0)