Fix race in local node creation

It was possible for the metastore Open call to return before it actually
created it's local node.
pull/4019/head
Jason Wilder 2015-09-05 09:07:37 -06:00
parent b8da247b08
commit 380d82b078
1 changed files with 1 additions and 0 deletions

View File

@ -256,6 +256,7 @@ func (s *Store) Open() error {
// Wait for a leader to be elected so we know the raft log is loaded // Wait for a leader to be elected so we know the raft log is loaded
// and up to date // and up to date
<-s.ready
return s.WaitForLeader(0) return s.WaitForLeader(0)
} }