mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 10:57:51 +00:00
close disco before holder
This commit is contained in:
parent
2713be9329
commit
0e4a7a29fb
1 changed files with 4 additions and 4 deletions
|
|
@ -684,10 +684,13 @@ func (s *Server) Close() error {
|
|||
// Notify goroutines to stop.
|
||||
close(s.closing)
|
||||
s.wg.Wait()
|
||||
|
||||
var errh, errd error
|
||||
var errhs error
|
||||
var errc error
|
||||
|
||||
if s.disCo != nil {
|
||||
errd = s.disCo.Close()
|
||||
}
|
||||
if s.cluster != nil {
|
||||
errc = s.cluster.close()
|
||||
}
|
||||
|
|
@ -701,9 +704,6 @@ func (s *Server) Close() error {
|
|||
s.snapshotQueue = nil
|
||||
}
|
||||
|
||||
if s.disCo != nil {
|
||||
errd = s.disCo.Close()
|
||||
}
|
||||
// prefer to return holder error over cluster
|
||||
// error. This order is somewhat arbitrary. It would be better if we had
|
||||
// some way to combine all the errors, but probably not important enough to
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue