Skip to content
Snippets Groups Projects
Commit d1ad061a authored by Steven Murray's avatar Steven Murray
Browse files

SqliteConn now gives SQLite upto 10 seconds to avoid a busy error

parent f8372e24
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,10 @@ SqliteConn::SqliteConn(const std::string &filename):
sqlite3_close(m_sqliteConn);
throw exception::Exception(msg);
}
// Give SQLite upto 10 seconds to avoid a busy error
sqlite3_busy_timeout(m_sqliteConn, 10000);
{
char *errMsg = nullptr;
if(SQLITE_OK != sqlite3_exec(m_sqliteConn, "PRAGMA foreign_keys = ON;", nullptr, nullptr, &errMsg)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment