runtime/v2: should use defer ctx to cleanup

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu 2021-01-11 23:22:38 +08:00
parent 75c2646229
commit 846cb963cc

View File

@ -155,7 +155,7 @@ func (m *TaskManager) Create(ctx context.Context, id string, opts runtime.Create
defer cancel() defer cancel()
_, errShim := shim.Delete(dctx) _, errShim := shim.Delete(dctx)
if errShim != nil { if errShim != nil {
shim.Shutdown(ctx) shim.Shutdown(dctx)
shim.Close() shim.Close()
} }
} }