Skip to content

Commit

Permalink
Merge pull request #6774 from mikebrow/cherrypick-#6109-release-1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
estesp committed Apr 5, 2022
2 parents 0849845 + 4dbd0c8 commit cadce9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unpacker.go
Expand Up @@ -65,11 +65,16 @@ func (c *Client) newUnpacker(ctx context.Context, rCtx *RemoteContext) (*unpacke
return nil, err
}
}
var limiter *semaphore.Weighted
if rCtx.MaxConcurrentDownloads > 0 {
limiter = semaphore.NewWeighted(int64(rCtx.MaxConcurrentDownloads))
}
return &unpacker{
updateCh: make(chan ocispec.Descriptor, 128),
snapshotter: snapshotter,
config: config,
c: c,
limiter: limiter,
}, nil
}

Expand Down

0 comments on commit cadce9e

Please sign in to comment.