From 9b063e2e30d4ee32012946fabefa58d9f424ecbf Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Wed, 10 Oct 2018 11:51:34 +0300 Subject: [PATCH] Copy TLSConfig to SentinelClient options --- sentinel.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sentinel.go b/sentinel.go index 5361a029..24d6db68 100644 --- a/sentinel.go +++ b/sentinel.go @@ -222,13 +222,18 @@ 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, - PoolSize: c.opt.PoolSize, - PoolTimeout: c.opt.PoolTimeout, - IdleTimeout: c.opt.IdleTimeout, + 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()