diff --git a/cache.go b/cache.go index deffc3b6..67b690ca 100644 --- a/cache.go +++ b/cache.go @@ -82,3 +82,8 @@ func (c *clientCache) observeRequest(ip string, observation requestObservation) return cacheResult{banned: observation.forceBan} } + c.mu.Lock() + defer c.mu.Unlock() + c.operations++ + c.cleanupLocked(observation.at) +