Browse Source

always cleanup blob download (#747)

Jeffrey Morgan 1 year ago
parent
commit
65dcd0ce35
1 changed files with 1 additions and 0 deletions
  1. 1 0
      server/download.go

+ 1 - 0
server/download.go

@@ -314,6 +314,7 @@ func downloadBlob(ctx context.Context, opts downloadOpts) error {
 		requestURL := opts.mp.BaseURL()
 		requestURL = requestURL.JoinPath("v2", opts.mp.GetNamespaceRepository(), "blobs", opts.digest)
 		if err := download.Prepare(ctx, requestURL, opts.regOpts); err != nil {
+			blobDownloadManager.Delete(opts.digest)
 			return err
 		}