linux: Ensure shim is killed if we can't connect to it initially

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-06-14 10:06:25 -07:00
parent 5922cfaba8
commit 709ba260de
2 changed files with 14 additions and 4 deletions

View File

@@ -183,7 +183,7 @@ func (r *Runtime) Create(ctx context.Context, id string, opts plugin.CreateOpts)
if err != nil {
return nil, err
}
s, err := newShim(r.shim, path, namespace, r.remote)
s, err := newShim(ctx, r.shim, path, namespace, r.remote)
if err != nil {
os.RemoveAll(path)
return nil, err