Skip to content

Commit

Permalink
ignore nil throttler
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 committed Aug 24, 2021
1 parent 01ea39a commit e1a056d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions node/impl/storminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,11 +725,13 @@ func (sm *StorageMinerAPI) DagstoreInitializeAll(ctx context.Context, params api

go func() {
for i, k := range toInitialize {
select {
case <-throttle:
// acquired a throttle token, proceed.
case <-ctx.Done():
return
if throttle != nil {
select {
case <-throttle:
// acquired a throttle token, proceed.
case <-ctx.Done():
return
}
}

go func(k string, i int) {
Expand Down

0 comments on commit e1a056d

Please sign in to comment.