From 5ac122b85fd98234842f03dc1c3d5676ee638d53 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Sat, 28 May 2022 20:15:38 +0200 Subject: [PATCH] lib/model: Don't include deleted items in kqueue warning threshold (ref #7855) (#8365) --- lib/model/folder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model/folder.go b/lib/model/folder.go index 96c07bad7..0091674ca 100644 --- a/lib/model/folder.go +++ b/lib/model/folder.go @@ -1045,7 +1045,7 @@ func (f *folder) monitorWatch(ctx context.Context) { case ev := <-summaryChan: if data, ok := ev.Data.(FolderSummaryEventData); !ok { f.evLogger.Log(events.Failure, "Unexpected type of folder-summary event in folder.monitorWatch") - } else if data.Summary.LocalTotalItems > kqueueItemCountThreshold { + } else if data.Summary.LocalTotalItems-data.Summary.LocalDeleted > kqueueItemCountThreshold { f.warnedKqueue = true summarySub.Unsubscribe() summaryChan = nil