Skip to content

Commit 80d2961

Browse files
authored
Merge pull request #1580 from darkyzhou/patch-1
make error message for unreachable sentinels more clear
2 parents 19e561f + ea806ac commit 80d2961

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sentinel.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func (c *sentinelFailover) MasterAddr(ctx context.Context) (string, error) {
485485
return addr, nil
486486
}
487487

488-
return "", errors.New("redis: all sentinels are unreachable")
488+
return "", errors.New("redis: all sentinels specified in configuration are unreachable")
489489
}
490490

491491
func (c *sentinelFailover) slaveAddrs(ctx context.Context) ([]string, error) {
@@ -530,7 +530,7 @@ func (c *sentinelFailover) slaveAddrs(ctx context.Context) ([]string, error) {
530530
return addrs, nil
531531
}
532532

533-
return []string{}, errors.New("redis: all sentinels are unreachable")
533+
return []string{}, errors.New("redis: all sentinels specified in configuration are unreachable")
534534
}
535535

536536
func (c *sentinelFailover) getMasterAddr(ctx context.Context, sentinel *SentinelClient) string {

0 commit comments

Comments
 (0)