runtime/v2: should use defer ctx to cleanup
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
75c2646229
commit
846cb963cc
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user