Only shutdown BoltDB when Raft is done with it
@@ -293,15 +293,16 @@ func (s *Store) Close(wait bool) error {
if err := s.db.Close(); err != nil {
return err
}
- if err := s.boltStore.Close(); err != nil {
- return err
- }
f := s.raft.Shutdown()
if wait {
if e := f.(raft.Future); e.Error() != nil {
return e.Error()
}
}
+ // Only shutdown Bolt when Raft is done with it.
+ if err := s.boltStore.Close(); err != nil {
+ return err
+ }
return nil
}
