Always release long-running fd on db close (#519)

This commit is contained in:
Toni Spets
2023-11-14 19:31:28 +02:00
committed by GitHub
parent ae4c9918d9
commit 85ddf32225

6
db.go
View File

@@ -352,6 +352,12 @@ func (db *DB) Close(ctx context.Context) (err error) {
}
}
if db.f != nil {
if e := db.f.Close(); e != nil && err == nil {
err = e
}
}
return err
}