mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-06 16:03:08 +00:00
stop connecting to out peers until target is reached (#2823)
This commit is contained in:
parent
dd3c13582e
commit
41bc582823
@ -732,7 +732,8 @@ proc connectToRelayPeers*(pm: PeerManager) {.async.} =
|
||||
shuffle(outsideBackoffPeers)
|
||||
|
||||
var index = 0
|
||||
var numPendingConnReqs = outsideBackoffPeers.len
|
||||
var numPendingConnReqs =
|
||||
min(outsideBackoffPeers.len, pm.outRelayPeersTarget - outRelayPeers.len)
|
||||
## number of outstanding connection requests
|
||||
|
||||
while numPendingConnReqs > 0 and outRelayPeers.len < pm.outRelayPeersTarget:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user