Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5a6c74e4e |
@@ -582,9 +582,10 @@ func (l *Ledger) attackExpiry(held []Ban, now time.Time) time.Time {
|
||||
// dropOne drops the earliest ban whose cause is not CauseAdmin of the
|
||||
// netblock that has gone longest without a request, of those that hold
|
||||
// such a ban, and the netblock with it if that was its only ban. It is
|
||||
// called with at least one such ban held.
|
||||
// called with at least one such ban held. It looks at each netblock once
|
||||
// at most, and drops nothing when none holds such a ban.
|
||||
func (l *Ledger) dropOne() {
|
||||
for {
|
||||
for range l.netblocks.Len() {
|
||||
netblock, bans, _ := l.netblocks.GetOldest()
|
||||
|
||||
i := slices.IndexFunc(*bans, func(ban Ban) bool {
|
||||
|
||||
Reference in New Issue
Block a user