Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Close file handler after database backups

Gabe Kangas7a5548e3b3fc
diff --git a/utils/backup.go b/utils/backup.go
index 72cd28295d..fe6de1c47e 100644
--- a/utils/backup.go
+++ b/utils/backup.go
@@ -85,6 +85,7 @@ func Backup(db *sql.DB, backupFile string) {
handleError(err)
return
}
+ defer f.Close()
// Create a gzip compression writer
w, err := gzip.NewWriterLevel(f, gzip.BestCompression)