Pass in context to lease done function in client

Allows the client to choose the context to finish the lease.
This allows the client to switch contexts when the main context
used to the create the lease may have been cancelled.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2018-03-22 14:09:24 -07:00
parent 9304193b8c
commit 43d0a5cb60
10 changed files with 21 additions and 19 deletions

View File

@@ -108,7 +108,7 @@ func (i *image) Unpack(ctx context.Context, snapshotterName string) error {
if err != nil {
return err
}
defer done()
defer done(ctx)
layers, err := i.getLayers(ctx, platforms.Default())
if err != nil {