check crypto type and congestion of connected peer for tunnel

This commit is contained in:
orignal 2024-08-18 18:34:28 -04:00
parent 28adb54c0a
commit 32ab95478e
2 changed files with 7 additions and 5 deletions

View file

@ -1055,7 +1055,7 @@ namespace transport
[isHighBandwidth](std::shared_ptr<const Peer> peer)->bool
{
// connected, not overloaded and not slow
return !peer->router && peer->IsConnected () && peer->isReachable &&
return !peer->router && peer->IsConnected () && peer->isEligible &&
peer->sessions.front ()->GetSendQueueSize () <= PEER_ROUTER_INFO_OVERLOAD_QUEUE_SIZE &&
!peer->sessions.front ()->IsSlow () && !peer->sessions.front ()->IsBandwidthExceeded (peer->isHighBandwidth) &&
(!isHighBandwidth || peer->isHighBandwidth);