update at 2019-11-26 11:40:57 by ehlxr
This commit is contained in:
parent
a0ad185b98
commit
e6fbd27eb1
@ -28,7 +28,6 @@ func (limiter *LimiterServer) IsAvailable() bool {
|
|||||||
if limiter.time.IsZero() ||
|
if limiter.time.IsZero() ||
|
||||||
limiter.time.Add(limiter.interval).Before(now) {
|
limiter.time.Add(limiter.interval).Before(now) {
|
||||||
limiter.reqCount = 0
|
limiter.reqCount = 0
|
||||||
limiter.time = now
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if limiter.reqCount < limiter.maxCount {
|
if limiter.reqCount < limiter.maxCount {
|
||||||
|
Loading…
Reference in New Issue
Block a user