We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9c88db2 + bb7bce1 commit ca6ee0cCopy full SHA for ca6ee0c
memberlist.go
@@ -655,6 +655,8 @@ func (m *Memberlist) Leave(timeout time.Duration) error {
655
656
m.nodeLock.Lock()
657
state, ok := m.nodeMap[m.config.Name]
658
+ incarnation := state.Incarnation
659
+ name := state.Name
660
m.nodeLock.Unlock()
661
if !ok {
662
m.logger.Printf("[WARN] memberlist: Leave but we're not in the node map.")
@@ -666,9 +668,9 @@ func (m *Memberlist) Leave(timeout time.Duration) error {
666
668
// intentionally. When Node equals From, other nodes know for
667
669
// sure this node is gone.
670
d := dead{
- Incarnation: state.Incarnation,
- Node: state.Name,
671
- From: state.Name,
+ Incarnation: incarnation,
672
+ Node: name,
673
+ From: name,
674
}
675
m.deadNode(&d)
676
0 commit comments