dag: remove unused waitgroup

This commit was moved from ipfs/go-ipfs-http-client@934fc60a7c
This commit is contained in:
Łukasz Magiera 2019-02-14 19:07:45 +01:00
parent 42273cab06
commit 93f684617a

View File

@ -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 {