Skip to content

Commit

Permalink
Use ACL cache jitter for ACL check
Browse files Browse the repository at this point in the history
Co-authored-by: Ignacio Gómez <[email protected]>
  • Loading branch information
PierreF and iegomez committed Mar 7, 2021
1 parent 5928188 commit 541c3f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (s *goStore) CheckAuthRecord(ctx context.Context, username, password string
//CheckAclCache checks if the username/topic/clientid/acc mix is present in the cache. Return if it's present and, if so, if it was granted privileges.
func (s *goStore) CheckACLRecord(ctx context.Context, username, topic, clientid string, acc int) (bool, bool) {
record := toACLRecord(username, topic, clientid, acc, s.h)
return s.checkRecord(ctx, record, expirationWithJitter(s.aclExpiration, s.authJitter))
return s.checkRecord(ctx, record, expirationWithJitter(s.aclExpiration, s.aclJitter))
}

func (s *goStore) checkRecord(ctx context.Context, record string, expirationTime time.Duration) (bool, bool) {
Expand Down

0 comments on commit 541c3f9

Please sign in to comment.