1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-09-03 01:44:29 +00:00

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: 

Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
bin
2021-05-06 17:18:01 +08:00
parent d0eda5ecfd
commit 79831fafaf

@@ -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)