From 0260cfe9544a23ca599130c30089f03725037000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?rich=CE=9Brd?= Date: Mon, 15 Apr 2024 08:33:23 -0400 Subject: [PATCH] fix(peer-manager): discovering peers should not lock the peer manager (#1084) --- waku/v2/peermanager/peer_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waku/v2/peermanager/peer_manager.go b/waku/v2/peermanager/peer_manager.go index e2c79ddf..d1af8ce3 100644 --- a/waku/v2/peermanager/peer_manager.go +++ b/waku/v2/peermanager/peer_manager.go @@ -304,7 +304,7 @@ func (pm *PeerManager) ensureMinRelayConnsPerTopic() { notConnectedPeers := pm.getNotConnectedPers(topicStr) if notConnectedPeers.Len() == 0 { pm.logger.Debug("could not find any peers in peerstore to connect to, discovering more", zap.String("pubSubTopic", topicStr)) - pm.discoverPeersByPubsubTopics([]string{topicStr}, relay.WakuRelayID_v200, pm.ctx, 2) + go pm.discoverPeersByPubsubTopics([]string{topicStr}, relay.WakuRelayID_v200, pm.ctx, 2) continue } pm.logger.Debug("connecting to eligible peers in peerstore", zap.String("pubSubTopic", topicStr))