Merge pull request #4262 from gaurav1086/fix_data_race_in_unpacker

unpacker: Fix data race and possible data corruption
This commit is contained in:
Phil Estes 2020-05-18 09:32:24 -04:00 committed by GitHub
commit 0814750023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,13 +178,13 @@ EachLayer:
fetchC[i] = make(chan struct{})
}
go func() {
go func(i int) {
err := u.fetch(ctx, h, layers[i:], fetchC)
if err != nil {
fetchErr <- err
}
close(fetchErr)
}()
}(i)
}
select {