Skip to content

Commit fb023bb

Browse files
authored
Merge pull request #82 from coroot/fix_fqdn_gc
fix garbage collection process for FQDN metrics
2 parents c4e4c21 + ce5baa8 commit fb023bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

containers/registry.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ func (r *Registry) handleEvents(ch <-chan ebpftracer.Event) {
158158
}
159159
activeIPs := map[netaddr.IP]struct{}{}
160160
for id, c := range r.containersById {
161-
if !c.Dead(now) {
162-
continue
163-
}
164161
for dst := range c.connectLastAttempt {
165162
activeIPs[dst.IP()] = struct{}{}
166163
}
164+
if !c.Dead(now) {
165+
continue
166+
}
167167
klog.Infoln("deleting dead container:", id)
168168
for cg, cc := range r.containersByCgroupId {
169169
if cc == c {

0 commit comments

Comments
 (0)