mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check crypto type and congestion of connected peer for tunnel
This commit is contained in:
parent
28adb54c0a
commit
32ab95478e
2 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue