fix(peer-manager): discovering peers should not lock the peer manager (#1084)

This commit is contained in:
richΛrd 2024-04-15 08:33:23 -04:00 committed by GitHub
parent 3f69fb3776
commit 0260cfe954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

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