mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
stop connecting to out peers until target is reached (#2823)
This commit is contained in:
parent
7e4f18cda7
commit
57ec129a48
@ -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