about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-01-23T15·45+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-01-23T15·45+0100
commit5e9c3da41282970d5a496d1327de69cc1274d353 (patch)
tree60d83272238a149b55a58cc5bfb5085f2d4c670a /src/libstore/local-store.cc
parent99ed558a93216288e50b11132f2a00a74cc6bb7f (diff)
Only warn about SQLite being busy once
No need to get annoying.
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 333feb2a5f30..84050f0e49b6 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -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