Kaynağa Gözat

Merge pull request #26310 from hqhq/cleanup_pullSchema2

Cleanup pullSchema2
Tõnis Tiigi 8 yıl önce
ebeveyn
işleme
331e724e87
1 değiştirilmiş dosya ile 3 ekleme ve 9 silme
  1. 3 9
      distribution/pull_v2.go

+ 3 - 9
distribution/pull_v2.go

@@ -559,10 +559,6 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
 
 	rootFS, release, err := p.config.DownloadManager.Download(ctx, downloadRootFS, descriptors, p.config.ProgressOutput)
 	if err != nil {
-		if configJSON != nil {
-			// Already received the config
-			return "", "", err
-		}
 		select {
 		case err = <-errChan:
 			return "", "", err
@@ -577,11 +573,9 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
 	}
 	defer release()
 
-	if configJSON == nil {
-		configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan)
-		if err != nil {
-			return "", "", err
-		}
+	configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan)
+	if err != nil {
+		return "", "", err
 	}
 
 	if unmarshalledConfig.RootFS == nil {