Merge pull request #1805 from liubin/fix/1804-select-sandbox-ctx

runtime: use s.ctx instead ctx for checking cancellation
This commit is contained in:
Chelsea Mafrica 2021-05-06 09:51:47 -07:00 committed by GitHub
commit 3e8137399c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ func watchOOMEvents(ctx context.Context, s *service) {
for { for {
select { select {
case <-ctx.Done(): case <-s.ctx.Done():
return return
default: default:
containerID, err := s.sandbox.GetOOMEvent(ctx) containerID, err := s.sandbox.GetOOMEvent(ctx)