This commit is contained in:
parent
f491cc8225
commit
fae3e31fda
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
core: Fix regression breaking non-raft clusters whose nodes share the same cluster_addr/api_addr.
|
||||
```
|
|
@ -238,7 +238,7 @@ func (c *Core) Leader() (isLeader bool, leaderAddr, clusterAddr string, err erro
|
|||
// to ourself, there's no point in paying any attention to it. And by
|
||||
// disregarding it, we can avoid a panic in raft tests using the Inmem network
|
||||
// layer when we try to connect back to ourself.
|
||||
if adv.ClusterAddr == c.ClusterAddr() && adv.RedirectAddr == c.redirectAddr {
|
||||
if adv.ClusterAddr == c.ClusterAddr() && adv.RedirectAddr == c.redirectAddr && c.getRaftBackend() != nil {
|
||||
return false, "", "", nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue