Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'database/db.go')
-rw-r--r--database/db.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/database/db.go b/database/db.go
index 2058729f..1998ba23 100644
--- a/database/db.go
+++ b/database/db.go
@@ -123,6 +123,11 @@ func InitDB(dbPath string) error {
func CloseDB() error {
if db != nil {
+
+ if err := Checkpoint(); err != nil {
+ log.Printf("error executing checkpoint: %v", err)
+ }
+
sqlDB, err := db.DB()
if err != nil {
return err