mirror of https://github.com/go-redis/redis.git
Merge pull request #1580 from darkyzhou/patch-1
make error message for unreachable sentinels more clear
This commit is contained in:
commit
80d296154f
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue