Explicitly close connection to SQLite on failed upgrade

This commit is contained in:
Hubert Hirtz 2021-09-13 16:59:41 +02:00 committed by Simon Ser
parent 8adf65ade2
commit 4dce5a91c9

View File

@ -150,6 +150,7 @@ func OpenSqliteDB(driver, source string) (Database, error) {
db := &SqliteDB{db: sqlSqliteDB}
if err := db.upgrade(); err != nil {
sqlSqliteDB.Close()
return nil, err
}