Merge pull request #417 from unistack-org/gossip
registry: [gossip] fix panic
This commit is contained in:
commit
c3722877c1
@ -561,9 +561,11 @@ func (g *gossipRegistry) run() {
|
|||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
var addrs []string
|
var addrs []string
|
||||||
g.RLock()
|
g.RLock()
|
||||||
for node, action := range g.members {
|
if g.member != nil {
|
||||||
if action == nodeActionLeave && g.member.LocalNode().Address() != node {
|
for node, action := range g.members {
|
||||||
addrs = append(addrs, node)
|
if action == nodeActionLeave && g.member.LocalNode().Address() != node {
|
||||||
|
addrs = append(addrs, node)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.RUnlock()
|
g.RUnlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user