[i] deferred removal from whitelist

This commit is contained in:
2021-10-10 19:03:19 +03:00
parent 80b2d2de15
commit 65b267963c
5 changed files with 36 additions and 8 deletions

View File

@ -60,7 +60,7 @@ func (a *Action) allow(unbanAll bool) {
unban := make([]string, 0)
for ip := range a.ips {
if unbanAll || bool(a.ips[ip]) { // aka if readyToUnban
if unbanAll || a.ips[ip] { // aka if readyToUnban
unban = append(unban, ip)
} else {
a.ips[ip] = true // mark readyToUnban next time