diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dal/sqlitedataprovider.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dal/sqlitedataprovider.cpp b/src/dal/sqlitedataprovider.cpp index 2e005d9d..a47c9862 100644 --- a/src/dal/sqlitedataprovider.cpp +++ b/src/dal/sqlitedataprovider.cpp @@ -95,6 +95,10 @@ void SqLiteDataProvider::connect() throw DbConnectionFailure(msg); } + // Wait up to one second when the database is busy. This should make sure + // transaction failures due to locked databases are very rare. + sqlite3_busy_timeout(mDb, 1000); + // Save the Db Name. mDbName = dbName; |