mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-18 23:36:39 +01:00
use connected peers if others not available
This commit is contained in:
parent
ef85277a1b
commit
924a7bc533
1 changed files with 5 additions and 0 deletions
|
@ -430,6 +430,11 @@ namespace tunnel
|
||||||
for(int i = 0; i < numHops; i++ )
|
for(int i = 0; i < numHops; i++ )
|
||||||
{
|
{
|
||||||
auto hop = nextHop (prevHop, inbound);
|
auto hop = nextHop (prevHop, inbound);
|
||||||
|
if (!hop && !i) // if no suitable peer found for first hop, try already connected
|
||||||
|
{
|
||||||
|
LogPrint (eLogInfo, "Tunnels: Can't select first hop for a tunnel. Trying already connected");
|
||||||
|
hop = i2p::transport::transports.GetRandomPeer ();
|
||||||
|
}
|
||||||
if (!hop)
|
if (!hop)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "Tunnels: Can't select next hop for ", prevHop->GetIdentHashBase64 ());
|
LogPrint (eLogError, "Tunnels: Can't select next hop for ", prevHop->GetIdentHashBase64 ());
|
||||||
|
|
Loading…
Add table
Reference in a new issue