File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ and one or more slaves (`mymaster` in the example).
105
105
106
106
* It is possible to optionally provide a role. The allowed roles are ` master `
107
107
and ` slave ` . When the role is ` slave ` , the client will try to connect to a
108
- random slave of the specified master.
108
+ random slave of the specified master. If a role is not specified, the client
109
+ will connect to the master.
109
110
110
111
* When using the Sentinel support you need to specify a list of sentinels to
111
112
connect to. The list does not need to enumerate all your Sentinel instances,
Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ def initialize(options)
477
477
super ( options )
478
478
479
479
@sentinels = options . fetch ( :sentinels ) . dup
480
- @role = options [ :role ] . to_s
480
+ @role = options . fetch ( :role , "master" ) . to_s
481
481
@master = options [ :host ]
482
482
end
483
483
You can’t perform that action at this time.
0 commit comments