1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-19 05:19:57 +00:00

correct index for connected transport

This commit is contained in:
orignal 2023-06-11 06:48:47 -04:00
parent 75aa9f2c0c
commit bb52056aec

View File

@ -710,9 +710,9 @@ namespace transport
transports |= it->second.priority[i]; transports |= it->second.priority[i];
i2p::data::netdb.ExcludeReachableTransports (ident, transports); i2p::data::netdb.ExcludeReachableTransports (ident, transports);
} }
if (it->second.router) if (it->second.router && it->second.numAttempts)
{ {
auto transport = it->second.priority[it->second.numAttempts]; auto transport = it->second.priority[it->second.numAttempts-1];
if (transport == i2p::data::RouterInfo::eNTCP2V4 || if (transport == i2p::data::RouterInfo::eNTCP2V4 ||
transport == i2p::data::RouterInfo::eNTCP2V6 || transport == i2p::data::RouterInfo::eNTCP2V6Mesh) transport == i2p::data::RouterInfo::eNTCP2V6 || transport == i2p::data::RouterInfo::eNTCP2V6Mesh)
it->second.router->GetProfile ()->Connected (); // outgoing NTCP2 connection if always real it->second.router->GetProfile ()->Connected (); // outgoing NTCP2 connection if always real