chainregistry: stop Neutrino before closing DB

To avoid the ChainService still attempting to access the database when
it gets closed, re-order the stop order such that the Chainservice gets
stopped before closing the DB.
This commit is contained in:
Johan T. Halseth 2019-04-08 12:48:00 +02:00
parent 9e67f25957
commit 9cc0ea93b2
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -736,8 +736,8 @@ func initNeutrinoBackend(chainDir string) (*neutrino.ChainService, func(), error
} }
cleanUp := func() { cleanUp := func() {
db.Close()
neutrinoCS.Stop() neutrinoCS.Stop()
db.Close()
} }
return neutrinoCS, cleanUp, nil return neutrinoCS, cleanUp, nil