summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'database.h')
-rw-r--r--database.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/database.h b/database.h
index ef62dde..5b46757 100644
--- a/database.h
+++ b/database.h
@@ -56,6 +56,8 @@ static inline sqlite3 *dbOpen(char *path, int flags) {
 	}
 	if (error) errx(EX_NOINPUT, "%s: %s", path, sqlite3_errmsg(db));
 
+	sqlite3_busy_timeout(db, 1000);
+
 	error = sqlite3_exec(db, "PRAGMA foreign_keys = true;", NULL, NULL, NULL);
 	if (error) errx(EX_SOFTWARE, "sqlite3_exec: %s", sqlite3_errmsg(db));