Skip to content

Commit

Permalink
Merge pull request #82 from coroot/fix_fqdn_gc
Browse files Browse the repository at this point in the history
fix garbage collection process for FQDN metrics
  • Loading branch information
def authored May 10, 2024
2 parents c4e4c21 + ce5baa8 commit fb023bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions containers/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ func (r *Registry) handleEvents(ch <-chan ebpftracer.Event) {
}
activeIPs := map[netaddr.IP]struct{}{}
for id, c := range r.containersById {
if !c.Dead(now) {
continue
}
for dst := range c.connectLastAttempt {
activeIPs[dst.IP()] = struct{}{}
}
if !c.Dead(now) {
continue
}
klog.Infoln("deleting dead container:", id)
for cg, cc := range r.containersByCgroupId {
if cc == c {
Expand Down

0 comments on commit fb023bb

Please sign in to comment.