Merge pull request #184 from pi-hole/fix/db_locking

Close database file after initialization
This commit is contained in:
DL6ER
2017-12-30 23:15:48 +01:00
committed by GitHub
+3
View File
@@ -169,6 +169,9 @@ void db_init(void)
}
}
// Close database to prevent having it opened all time
sqlite3_close(db);
if (pthread_mutex_init(&dblock, NULL) != 0)
{
logg("FATAL: DB mutex init failed\n");