Update accept limit parameters
This commit is contained in:
parent
96050948c2
commit
70093a4db3
|
@ -1270,7 +1270,7 @@ func (cl *Client) acceptLimitClearer() {
|
|||
select {
|
||||
case <-cl.closed.LockedChan(&cl.mu):
|
||||
return
|
||||
case <-time.After(5 * time.Minute):
|
||||
case <-time.After(15 * time.Minute):
|
||||
cl.mu.Lock()
|
||||
cl.clearAcceptLimits()
|
||||
cl.mu.Unlock()
|
||||
|
@ -1282,5 +1282,5 @@ func (cl *Client) rateLimitAccept(ip net.IP) bool {
|
|||
if cl.config.DisableAcceptRateLimiting {
|
||||
return false
|
||||
}
|
||||
return cl.acceptLimiter[ipStr(maskIpForAcceptLimiting(ip).String())] >= 3
|
||||
return cl.acceptLimiter[ipStr(maskIpForAcceptLimiting(ip).String())] > 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue