lib/api, lib/model: Fixes around event request tracking (#6774)
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/util"
|
||||
)
|
||||
|
||||
const minSummaryInterval = time.Minute
|
||||
const maxDurationSinceLastEventReq = time.Minute
|
||||
|
||||
type FolderSummaryService interface {
|
||||
suture.Service
|
||||
@@ -303,7 +303,7 @@ func (c *folderSummaryService) foldersToHandle() []string {
|
||||
c.lastEventReqMut.Lock()
|
||||
last := c.lastEventReq
|
||||
c.lastEventReqMut.Unlock()
|
||||
if time.Since(last) > minSummaryInterval {
|
||||
if time.Since(last) > maxDurationSinceLastEventReq {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user