Skip to content

Commit

Permalink
fix: handle closing file handle (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
fritterhoff authored Nov 2, 2023
1 parent 252f84d commit af135ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func NewOfflineDatabase(dbFile string, updatedDbFile string) (*OfflineDatabase,
}
if !lockExists {
logger.Info("Updating database")
db.Close()
odb.file.database.Close()
if err := os.Rename(updatedDbFile, dbFile); err != nil {
log.Panic(err)
}
Expand Down

0 comments on commit af135ee

Please sign in to comment.