mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 19:07:48 +08:00
dag: remove unused waitgroup
This commit was moved from ipfs/go-ipfs-http-client@934fc60a7c
This commit is contained in:
parent
42273cab06
commit
93f684617a
@ -39,13 +39,10 @@ func (api *HttpDagServ) Get(ctx context.Context, c cid.Cid) (format.Node, error)
|
||||
|
||||
func (api *HttpDagServ) GetMany(ctx context.Context, cids []cid.Cid) <-chan *format.NodeOption {
|
||||
out := make(chan *format.NodeOption)
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(len(cids))
|
||||
|
||||
for _, c := range cids {
|
||||
// TODO: Consider limiting concurrency of this somehow
|
||||
go func(c cid.Cid) {
|
||||
defer wg.Done()
|
||||
n, err := api.Get(ctx, c)
|
||||
|
||||
select {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user