Merge pull request #1580 from darkyzhou/patch-1

make error message for unreachable sentinels more clear
This commit is contained in:
Vladimir Mihailenco 2020-12-16 10:17:18 +02:00 committed by GitHub
commit 80d296154f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -485,7 +485,7 @@ func (c *sentinelFailover) MasterAddr(ctx context.Context) (string, error) {
return addr, nil return addr, nil
} }
return "", errors.New("redis: all sentinels are unreachable") return "", errors.New("redis: all sentinels specified in configuration are unreachable")
} }
func (c *sentinelFailover) slaveAddrs(ctx context.Context) ([]string, error) { func (c *sentinelFailover) slaveAddrs(ctx context.Context) ([]string, error) {
@ -530,7 +530,7 @@ func (c *sentinelFailover) slaveAddrs(ctx context.Context) ([]string, error) {
return addrs, nil return addrs, nil
} }
return []string{}, errors.New("redis: all sentinels are unreachable") return []string{}, errors.New("redis: all sentinels specified in configuration are unreachable")
} }
func (c *sentinelFailover) getMasterAddr(ctx context.Context, sentinel *SentinelClient) string { func (c *sentinelFailover) getMasterAddr(ctx context.Context, sentinel *SentinelClient) string {