ignore nil throttler
This commit is contained in:
parent
01ea39adad
commit
e1a056db46
@ -725,12 +725,14 @@ func (sm *StorageMinerAPI) DagstoreInitializeAll(ctx context.Context, params api
|
||||
|
||||
go func() {
|
||||
for i, k := range toInitialize {
|
||||
if throttle != nil {
|
||||
select {
|
||||
case <-throttle:
|
||||
// acquired a throttle token, proceed.
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
go func(k string, i int) {
|
||||
r := api.DagstoreInitializeAllEvent{
|
||||
|
Loading…
Reference in New Issue
Block a user