Commit 4b5e950d authored by Ronan's avatar Ronan

fix(MainDb): disable db lock for Android

parent 94ff0564
......@@ -1364,6 +1364,11 @@ void MainDb::init () {
return sanitized;
};
// Disable locking. (Issue on Android on crash.)
// See: https://stackoverflow.com/questions/17348480/how-do-i-prevent-sqlite-database-locks
if (backend == Sqlite3)
*session << "PRAGMA read_uncommitted = ON";
// TODO: Migrate all statements in statements.cpp.
*session <<
"CREATE TABLE IF NOT EXISTS sip_address ("
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment