Skip to content

Commit

Permalink
Merge pull request #572 from nats-io/perms_cache_fix
Browse files Browse the repository at this point in the history
Fix permissions cache pruning
  • Loading branch information
tylertreat committed Aug 31, 2017
2 parents 7bb563d + 713b1c5 commit c7fc876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ func (c *client) processMsg(msg []byte) {
// Prune the permissions cache. Keeps us from unbounded growth.
r := 0
for subject := range c.perms.pcache {
delete(c.cache.results, subject)
delete(c.perms.pcache, subject)
r++
if r > pruneSize {
break
Expand Down

0 comments on commit c7fc876

Please sign in to comment.