mirror of
https://github.com/yunginnanet/Rate5
synced 2024-06-20 22:18:33 +00:00
Fix Refactor (perf): bad type assertion
This commit is contained in:
parent
598aa983e8
commit
953ca476b5
@ -164,7 +164,7 @@ func (q *Limiter) Check(from Identity) (limited bool) {
|
||||
func (q *Limiter) Peek(from Identity) bool {
|
||||
q.Patrons.DeleteExpired()
|
||||
if ct, ok := q.Patrons.Get(from.UniqueKey()); ok {
|
||||
count := ct.(int64)
|
||||
count := ct.(*atomic.Int64).Load()
|
||||
if count > q.Ruleset.Burst {
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user