diff --git a/raft/node.go b/raft/node.go index 5fce58457..c8410fdc7 100644 --- a/raft/node.go +++ b/raft/node.go @@ -462,8 +462,12 @@ func (n *node) ApplyConfChange(cc pb.ConfChange) *pb.ConfState { func (n *node) Status() Status { c := make(chan Status) - n.status <- c - return <-c + select { + case n.status <- c: + return <-c + case <-n.done: + return Status{} + } } func (n *node) ReportUnreachable(id uint64) {