From 846cb963cc4fe20237092bdbe62828dfe2ff1541 Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Mon, 11 Jan 2021 23:22:38 +0800 Subject: [PATCH] runtime/v2: should use defer ctx to cleanup Signed-off-by: Wei Fu --- runtime/v2/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/v2/manager.go b/runtime/v2/manager.go index 085d77b51..177b2f144 100644 --- a/runtime/v2/manager.go +++ b/runtime/v2/manager.go @@ -155,7 +155,7 @@ func (m *TaskManager) Create(ctx context.Context, id string, opts runtime.Create defer cancel() _, errShim := shim.Delete(dctx) if errShim != nil { - shim.Shutdown(ctx) + shim.Shutdown(dctx) shim.Close() } }