Merge pull request #7169 from filecoin-project/feat/dagstore-zero-concurrency

Ignore nil throttler
This commit is contained in:
Aarsh Shah 2021-08-24 13:20:49 +05:30 committed by GitHub
commit 5993257eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -725,11 +725,13 @@ func (sm *StorageMinerAPI) DagstoreInitializeAll(ctx context.Context, params api
go func() { go func() {
for i, k := range toInitialize { for i, k := range toInitialize {
select { if throttle != nil {
case <-throttle: select {
// acquired a throttle token, proceed. case <-throttle:
case <-ctx.Done(): // acquired a throttle token, proceed.
return case <-ctx.Done():
return
}
} }
go func(k string, i int) { go func(k string, i int) {