mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Only warn about SQLite being busy once
No need to get annoying.
This commit is contained in:
parent
99ed558a93
commit
5e9c3da412
1 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,11 @@ static void throwSQLiteError(sqlite3 * db, const format & f)
|
|||
{
|
||||
int err = sqlite3_errcode(db);
|
||||
if (err == SQLITE_BUSY) {
|
||||
printMsg(lvlError, "warning: SQLite database is busy");
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
printMsg(lvlError, "warning: SQLite database is busy");
|
||||
warned = true;
|
||||
}
|
||||
/* Sleep for a while since retrying the transaction right away
|
||||
is likely to fail again. */
|
||||
#if HAVE_NANOSLEEP
|
||||
|
|
Loading…
Reference in a new issue