fix(MainDb): disable db lock for Android

This commit is contained in:
Ronan Abhamon 2018-02-22 16:55:03 +01:00
parent 94ff056468
commit 4b5e950d01

View file

@ -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 ("