runtime: use s.ctx instead ctx for checking cancellation
s.ctx should be used for checking cancellation, and the
local ctx is used for tracing.
Fixes:
@@ -142,7 +142,7 @@ func watchOOMEvents(ctx context.Context, s *service) {
for {
select {
- case <-ctx.Done():
+ case <-s.ctx.Done():
return
default:
containerID, err := s.sandbox.GetOOMEvent(ctx)
