Move warning timing logic into handleSQLiteBusy.
This commit is contained in:
@@ -239,9 +239,11 @@ SQLiteTxn::~SQLiteTxn()
|
||||
}
|
||||
}
|
||||
|
||||
void handleSQLiteBusy(const SQLiteBusy & e, bool shouldWarn)
|
||||
void handleSQLiteBusy(const SQLiteBusy & e, time_t & nextWarning)
|
||||
{
|
||||
if (shouldWarn) {
|
||||
time_t now = time(0);
|
||||
if (now > nextWarning) {
|
||||
nextWarning = now + 10;
|
||||
logWarning({
|
||||
.msg = hintfmt(e.what())
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user