1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-08-31 01:41:50 +00:00

check outbound tunnels only for LeaseSet request

This commit is contained in:
orignal 2025-02-14 21:53:38 -05:00
parent 4bb86b6a86
commit 48aaecacce

View File

@ -101,7 +101,8 @@ namespace client
return; return;
} }
m_ReadinessCheckTimer.cancel (); m_ReadinessCheckTimer.cancel ();
if (!IsReady ()) auto pool = GetTunnelPool ();
if (!pool || pool->GetOutboundTunnels ().empty ())
{ {
// try again later // try again later
m_ReadinessCheckTimer.expires_from_now (boost::posix_time::seconds(I2CP_DESTINATION_READINESS_CHECK_INTERVAL)); m_ReadinessCheckTimer.expires_from_now (boost::posix_time::seconds(I2CP_DESTINATION_READINESS_CHECK_INTERVAL));
@ -111,6 +112,7 @@ namespace client
if (ecode != boost::asio::error::operation_aborted) if (ecode != boost::asio::error::operation_aborted)
s->PostCreateNewLeaseSet (tunnels); s->PostCreateNewLeaseSet (tunnels);
}); });
return;
} }
uint8_t priv[256] = {0}; uint8_t priv[256] = {0};
i2p::data::LocalLeaseSet ls (m_Identity, priv, tunnels); // we don't care about encryption key, we need leases only i2p::data::LocalLeaseSet ls (m_Identity, priv, tunnels); // we don't care about encryption key, we need leases only