From 8464df04b843ec217ac4cc8289cb7411b0f8052b Mon Sep 17 00:00:00 2001 From: cody Date: Tue, 28 May 2024 12:08:48 +0800 Subject: [PATCH] feat: change go routine limit to peers size on do conn --- core/node/peering.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/node/peering.go b/core/node/peering.go index 236fdca34..ce613bb9a 100644 --- a/core/node/peering.go +++ b/core/node/peering.go @@ -109,7 +109,7 @@ func doConcurrentConn(ctx context.Context, host host.Host, peers map[peer.ID]boo } g := errgroup.Group{} - g.SetLimit(maxNLastConn) + g.SetLimit(len(peers)) connected := int32(0)