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

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

parent e31c6aac
Branches
Tags
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.
Please register or to comment