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:
|
||||
var addrs []string
|
||||
g.RLock()
|
||||
for node, action := range g.members {
|
||||
if action == nodeActionLeave && g.member.LocalNode().Address() != node {
|
||||
addrs = append(addrs, node)
|
||||
if g.member != nil {
|
||||
for node, action := range g.members {
|
||||
if action == nodeActionLeave && g.member.LocalNode().Address() != node {
|
||||
addrs = append(addrs, node)
|
||||
}
|
||||
}
|
||||
}
|
||||
g.RUnlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user