Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions daemon/images/image_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func (i *ImageService) pullImageWithReference(ctx context.Context, ref reference

go func() {
progressutils.WriteDistributionProgress(cancelFunc, outStream, progressChan)
close(writesDone)
}()

ctx = namespaces.WithNamespace(ctx, i.contentNamespace)
Expand All @@ -86,7 +85,6 @@ func (i *ImageService) pullImageWithReference(ctx context.Context, ref reference
if err != nil {
return err
}
defer done(ctx)

cs := &contentStoreForPull{
ContentStore: i.content,
Expand Down Expand Up @@ -115,16 +113,13 @@ func (i *ImageService) pullImageWithReference(ctx context.Context, ref reference

err = distribution.Pull(ctx, ref, imagePullConfig, cs)
close(progressChan)
done(ctx)
<-writesDone
return err
}

func tempLease(ctx context.Context, mgr leases.Manager) (context.Context, func(context.Context) error, error) {
nop := func(context.Context) error { return nil }
_, ok := leases.FromContext(ctx)
if ok {
return ctx, nop, nil
}

// Use an expiration that ensures the lease is cleaned up at some point if there is a crash, SIGKILL, etc.
opts := []leases.Opt{
Expand Down