Skip to content

Commit f91277d

Browse files
committed
coreapi pubsub: don't allocate wg
License: MIT Signed-off-by: Łukasz Magiera <[email protected]>
1 parent 1facb7b commit f91277d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/coreapi/pubsub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid cid.Cid) {
9595
defer cancel()
9696

9797
provs := n.Routing.FindProvidersAsync(ctx, cid, 10)
98-
wg := &sync.WaitGroup{}
98+
var wg sync.WaitGroup
9999
for p := range provs {
100100
wg.Add(1)
101101
go func(pi pstore.PeerInfo) {

0 commit comments

Comments
 (0)