mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Update node.go
This commit is contained in:
parent
7f9b06e7aa
commit
8846d877dd
1 changed files with 2 additions and 1 deletions
|
|
@ -794,9 +794,10 @@ func (n *Node) wrapDatabase(db ethdb.Database) ethdb.Database {
|
|||
// closeDatabases closes all open databases.
|
||||
func (n *Node) closeDatabases() (errors []error) {
|
||||
for db := range n.databases {
|
||||
delete(n.databases, db)
|
||||
if err := db.Database.Close(); err != nil {
|
||||
errors = append(errors, err)
|
||||
} else {
|
||||
delete(n.databases, db)
|
||||
}
|
||||
}
|
||||
return errors
|
||||
|
|
|
|||
Loading…
Reference in a new issue