Merge pull request #2910 from halseth/neutrino-chainservice-stoporder
chainregistry: stop Neutrino before closing DB
This commit is contained in:
commit
2782baf793
@ -730,14 +730,15 @@ func initNeutrinoBackend(chainDir string) (*neutrino.ChainService, func(), error
|
|||||||
"client: %v", err)
|
"client: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp := func() {
|
|
||||||
db.Close()
|
|
||||||
neutrinoCS.Stop()
|
|
||||||
}
|
|
||||||
if err := neutrinoCS.Start(); err != nil {
|
if err := neutrinoCS.Start(); err != nil {
|
||||||
cleanUp()
|
db.Close()
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanUp := func() {
|
||||||
|
neutrinoCS.Stop()
|
||||||
|
db.Close()
|
||||||
|
}
|
||||||
|
|
||||||
return neutrinoCS, cleanUp, nil
|
return neutrinoCS, cleanUp, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user