fix race condition
parent
e9a2c33556
commit
52077b2dfc
|
@ -168,6 +168,8 @@ func (s *store) setOpen() error {
|
|||
|
||||
// peers returns the raft peers known to this store
|
||||
func (s *store) peers() []string {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
if s.raftState == nil {
|
||||
return []string{s.raftAddr}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue