use flag value for max

This commit is contained in:
Özgür Kesim 2024-01-15 19:24:08 +01:00
parent 5ceede6da1
commit edc5131159

View File

@ -146,7 +146,7 @@ var badActors = map[string]int{}
func isBadActor(host string) bool {
mux.RLock()
defer mux.RUnlock()
if n, ok := badActors[host]; ok && n >= 10 {
if n, ok := badActors[host]; ok && n >= *max {
return true
}
return false