Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
| ... | ... |
@@ -559,10 +559,6 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s |
| 559 | 559 |
|
| 560 | 560 |
rootFS, release, err := p.config.DownloadManager.Download(ctx, downloadRootFS, descriptors, p.config.ProgressOutput) |
| 561 | 561 |
if err != nil {
|
| 562 |
- if configJSON != nil {
|
|
| 563 |
- // Already received the config |
|
| 564 |
- return "", "", err |
|
| 565 |
- } |
|
| 566 | 562 |
select {
|
| 567 | 563 |
case err = <-errChan: |
| 568 | 564 |
return "", "", err |
| ... | ... |
@@ -577,11 +573,9 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s |
| 577 | 577 |
} |
| 578 | 578 |
defer release() |
| 579 | 579 |
|
| 580 |
- if configJSON == nil {
|
|
| 581 |
- configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan) |
|
| 582 |
- if err != nil {
|
|
| 583 |
- return "", "", err |
|
| 584 |
- } |
|
| 580 |
+ configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan) |
|
| 581 |
+ if err != nil {
|
|
| 582 |
+ return "", "", err |
|
| 585 | 583 |
} |
| 586 | 584 |
|
| 587 | 585 |
if unmarshalledConfig.RootFS == nil {
|