Compact DB on close

This commit is contained in:
Andreas Schneider 2020-10-10 16:29:26 +02:00
parent 129df9d7f2
commit 7901eb8eb4
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@ func NewDBStore(filename string) (*DBStore, error) {
}
func (store *DBStore) Close() error {
if err := store.db.Shrink(); err != nil {
return err
}
return store.db.Close()
}