Merge pull request #882 from go-redis/fix/sentinel-options

Copy TLSConfig to SentinelClient options
This commit is contained in:
Vladimir Mihailenco 2018-10-10 12:04:06 +03:00 committed by GitHub
commit 55f1f4681d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -222,6 +222,8 @@ func (c *sentinelFailover) masterAddr() (string, error) {
sentinel := NewSentinelClient(&Options{
Addr: sentinelAddr,
MaxRetries: c.opt.MaxRetries,
DialTimeout: c.opt.DialTimeout,
ReadTimeout: c.opt.ReadTimeout,
WriteTimeout: c.opt.WriteTimeout,
@ -229,6 +231,9 @@ func (c *sentinelFailover) masterAddr() (string, error) {
PoolSize: c.opt.PoolSize,
PoolTimeout: c.opt.PoolTimeout,
IdleTimeout: c.opt.IdleTimeout,
IdleCheckFrequency: c.opt.IdleCheckFrequency,
TLSConfig: c.opt.TLSConfig,
})
masterAddr, err := sentinel.GetMasterAddrByName(c.masterName).Result()