summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-05 04:32:15 -0500
committerJune McEnroe <june@causal.agency>2019-12-05 04:32:15 -0500
commit35146e50190c3510ad891342b0ac158ddbd21a97 (patch)
tree1f43a61d0ecd5f25c9876c20cacf271006051552
parentMake user and host NOT NULL as well (diff)
downloadlitterbox-35146e50190c3510ad891342b0ac158ddbd21a97.tar.gz
litterbox-35146e50190c3510ad891342b0ac158ddbd21a97.zip
Set busy timeout
Diffstat (limited to '')
-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));