From ceab73007f52a200f6f1cd404b7b3917623e7a79 Mon Sep 17 00:00:00 2001 From: guodong Date: Wed, 30 Nov 2022 00:32:08 +0800 Subject: [PATCH] use MaxConcurrentDownloads instead of MaxConcurrentUploadedLayers Signed-off-by: guodong --- pull.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pull.go b/pull.go index b79055a60..5d96c8cc7 100644 --- a/pull.go +++ b/pull.go @@ -70,7 +70,6 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (_ Ima tracing.Attribute("image.ref", ref), tracing.Attribute("unpack", pullCtx.Unpack), tracing.Attribute("max.concurrent.downloads", pullCtx.MaxConcurrentDownloads), - tracing.Attribute("max.concurrent.upload.layers", pullCtx.MaxConcurrentUploadedLayers), tracing.Attribute("platforms.count", len(pullCtx.Platforms)), ) @@ -109,7 +108,7 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (_ Ima ApplyOpts: uconfig.ApplyOpts, } uopts := []unpack.UnpackerOpt{unpack.WithUnpackPlatform(platform)} - if pullCtx.MaxConcurrentUploadedLayers > 0 { + if pullCtx.MaxConcurrentDownloads > 0 { uopts = append(uopts, unpack.WithLimiter(semaphore.NewWeighted(int64(pullCtx.MaxConcurrentDownloads)))) } if uconfig.DuplicationSuppressor != nil {