diff --git a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataSessionWriter.cs b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataSessionWriter.cs index 3a100982c8..6e8eb0547f 100644 --- a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataSessionWriter.cs +++ b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataSessionWriter.cs @@ -69,7 +69,13 @@ namespace ICSharpCode.UsageDataCollector if (isDisposed) return; try { - FlushOutstandingChanges(); + try { + FlushOutstandingChanges(); + } catch (SQLiteException ex) { + // Ignore exception if the DB file is locked + if (ex.ErrorCode != SQLiteErrorCode.Locked) + throw; + } } catch (Exception ex) { Action onException = this.OnException; if (onException != null)