Skip to content

Commit

Permalink
Merge pull request #184 from pi-hole/fix/db_locking
Browse files Browse the repository at this point in the history
Close database file after initialization

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Jan 6, 2018
1 parent 1e45569 commit b6d6e66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions database.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit b6d6e66

Please sign in to comment.