Deregister groupcache on close
This commit is contained in:
parent
05559e2551
commit
c438c158fc
@ -278,9 +278,10 @@ func (d *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator {
|
|||||||
return NewIterator(start, prefix, d.db)
|
return NewIterator(start, prefix, d.db)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close satisfies the io.Closer interface
|
// Close satisfies the io.Closer interface.
|
||||||
// Close closes the db connection
|
// Close closes the db connection and deregisters from groupcache.
|
||||||
func (d *Database) Close() error {
|
func (d *Database) Close() error {
|
||||||
|
groupcache.DeregisterGroup(d.cache.Name())
|
||||||
return d.db.DB.Close()
|
return d.db.DB.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user