Update accept limit parameters

This commit is contained in:
Matt Joiner 2018-06-22 17:43:02 +10:00
parent 96050948c2
commit 70093a4db3
1 changed files with 2 additions and 2 deletions

View File

@ -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
}