mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-29 12:35:31 +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: #1804 Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user