Skip to content

Commit

Permalink
Merge pull request #6504 from jepio/jepio/pkg-oom-v2-quiet-shutdown
Browse files Browse the repository at this point in the history
pkg/oom/v2: handle EventChan routine shutdown quietly
  • Loading branch information
dmcgowan committed Feb 8, 2022
2 parents d1c3b75 + 821c961 commit 33b7f77
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/oom/v2/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ func (w *watcher) Add(id string, cgx interface{}) error {
i.ev = ev
w.itemCh <- i
case err := <-errCh:
i.err = err
w.itemCh <- i
// we no longer get any event/err when we got an err
logrus.WithError(err).Warn("error from *cgroupsv2.Manager.EventChan")
// channel is closed when cgroup gets deleted
if err != nil {
i.err = err
w.itemCh <- i
// we no longer get any event/err when we got an err
logrus.WithError(err).Warn("error from *cgroupsv2.Manager.EventChan")
}
return
}
}
Expand Down

0 comments on commit 33b7f77

Please sign in to comment.