fix db WAL memory leak #1056

This commit is contained in:
Alireza Ahmadi
2026-03-22 19:02:09 +01:00
parent 135fcb0cda
commit 9d35e02e0e
3 changed files with 15 additions and 5 deletions
+1 -2
View File
@@ -378,8 +378,7 @@ func (s *ClientService) DepleteClients() ([]uint, error) {
defer func() {
if err == nil {
tx.Commit()
_, err1 := db.Raw("PRAGMA wal_checkpoint(FULL)").Rows()
if err1 != nil {
if err1 := db.Exec("PRAGMA wal_checkpoint(FULL)").Error; err1 != nil {
logger.Error("Error checkpointing WAL: ", err1.Error())
}
} else {