Merge pull request #2910 from halseth/neutrino-chainservice-stoporder

chainregistry: stop Neutrino before closing DB
This commit is contained in:
Johan T. Halseth authored and GitHub committed 2019-04-09 09:49:32 +02:00
commit 2782baf793
1 file changed
+6 -5
+6 -5
View File
@@ -730,14 +730,15 @@ func initNeutrinoBackend(chainDir string) (*neutrino.ChainService, func(), error
"client: %v", err)
}
cleanUp := func() {
db.Close()
neutrinoCS.Stop()
}
if err := neutrinoCS.Start(); err != nil {
cleanUp()
db.Close()
return nil, nil, err
}
cleanUp := func() {
neutrinoCS.Stop()
db.Close()
}
return neutrinoCS, cleanUp, nil
}