feat: user_rework (todo -> GetAll)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package ratelimiter
|
||||
|
||||
import (
|
||||
"log"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
@@ -26,8 +25,6 @@ func (rl *FixedWindowLimiter) Allow(ip string) (bool, time.Duration) {
|
||||
count, exists := rl.clients[ip]
|
||||
rl.RUnlock()
|
||||
|
||||
log.Println(count, exists)
|
||||
|
||||
if !exists || count < rl.limit {
|
||||
rl.Lock()
|
||||
if !exists {
|
||||
|
||||
Reference in New Issue
Block a user