From 79831fafaf81d4cbaa9077505f9d91a5c653dc44 Mon Sep 17 00:00:00 2001 From: bin Date: Thu, 6 May 2021 17:18:01 +0800 Subject: [PATCH] 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: #1804 Signed-off-by: bin --- src/runtime/containerd-shim-v2/wait.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/containerd-shim-v2/wait.go b/src/runtime/containerd-shim-v2/wait.go index ad2a3af8a9..81a05aa209 100644 --- a/src/runtime/containerd-shim-v2/wait.go +++ b/src/runtime/containerd-shim-v2/wait.go @@ -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)