Skip to content

Commit

Permalink
🚑 fix msc length calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillDanshin committed Apr 16, 2018
1 parent 8d25c48 commit 5571638
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fasthttprouter_cache.go
Expand Up @@ -96,7 +96,10 @@ func (c *cache) maintain() {
skipIter := true
c.mu.RLock()
for _, v := range c.v {
if len(v.v) > 256 {
v.mu.RLock()
mscLen := len(v.v)
v.mu.RUnlock()
if mscLen > 256 {
skipIter = false
break
}
Expand Down

0 comments on commit 5571638

Please sign in to comment.