Allow giving context to database close (#520)

This commit is contained in:
Toni Spets
2023-11-14 19:28:58 +02:00
committed by GitHub
parent 977d4a5ee4
commit ae4c9918d9
3 changed files with 10 additions and 13 deletions

View File

@@ -168,7 +168,7 @@ func (c *ReplicateCommand) Run() (err error) {
// Close closes all open databases.
func (c *ReplicateCommand) Close() (err error) {
for _, db := range c.DBs {
if e := db.Close(); e != nil {
if e := db.Close(context.Background()); e != nil {
db.Logger.Error("error closing db", "error", e)
if err == nil {
err = e