mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-28 17:58:15 -07:00
fix a memory leak
Even after the timer fired, we were retaining a pointer to it; clean those up too along with the other cleanup tasks.
This commit is contained in:
@@ -158,6 +158,7 @@ func (dm *DLineManager) addNetworkInternal(network net.IPNet, info IPBanInfo) (i
|
||||
if ok && netBan.Info.TimeCreated.Equal(timeCreated) {
|
||||
delete(dm.networks, id)
|
||||
// TODO(slingamn) here's where we'd remove it from the radix tree
|
||||
delete(dm.expirationTimers, id)
|
||||
}
|
||||
}
|
||||
dm.expirationTimers[id] = time.AfterFunc(timeLeft, processExpiration)
|
||||
|
||||
Reference in New Issue
Block a user