Skip to content

Commit

Permalink
coreapi pubsub: don't allocate wg
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
  • Loading branch information
magik6k committed Oct 2, 2018
1 parent 1facb7b commit f91277d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/coreapi/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid cid.Cid) {
defer cancel()

provs := n.Routing.FindProvidersAsync(ctx, cid, 10)
wg := &sync.WaitGroup{}
var wg sync.WaitGroup
for p := range provs {
wg.Add(1)
go func(pi pstore.PeerInfo) {
Expand Down

0 comments on commit f91277d

Please sign in to comment.