Unverified Commit 2c46877b authored by astaxie's avatar astaxie Committed by GitHub

Merge pull request #3390 from astaxie/FixDataRaceOnCache

Fix  #3354
parents cfe54a02 9e036bca
......@@ -209,7 +209,11 @@ func (bc *MemoryCache) StartAndGC(config string) error {
// check expiration.
func (bc *MemoryCache) vacuum() {
if bc.Every < 1 {
bc.RLock()
every := bc.Every
bc.RUnlock()
if every < 1 {
return
}
for {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment