Browse Source

don't try SSU peer test if SSU is disabled

pull/1774/head
orignal 2 years ago
parent
commit
3ed625f949
  1. 7
      libi2pd/Transports.cpp

7
libi2pd/Transports.cpp

@ -636,6 +636,8 @@ namespace transport
LogPrint (eLogInfo, "Transports: Started peer test IPv4"); LogPrint (eLogInfo, "Transports: Started peer test IPv4");
std::set<i2p::data::IdentHash> excluded; std::set<i2p::data::IdentHash> excluded;
excluded.insert (i2p::context.GetIdentHash ()); // don't pick own router excluded.insert (i2p::context.GetIdentHash ()); // don't pick own router
if (m_SSUServer)
{
bool statusChanged = false; bool statusChanged = false;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
@ -657,7 +659,7 @@ namespace transport
} }
if (!statusChanged) if (!statusChanged)
LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv4"); LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv4");
}
// SSU2 // SSU2
if (m_SSU2Server) if (m_SSU2Server)
{ {
@ -673,6 +675,8 @@ namespace transport
LogPrint (eLogInfo, "Transports: Started peer test IPv6"); LogPrint (eLogInfo, "Transports: Started peer test IPv6");
std::set<i2p::data::IdentHash> excluded; std::set<i2p::data::IdentHash> excluded;
excluded.insert (i2p::context.GetIdentHash ()); // don't pick own router excluded.insert (i2p::context.GetIdentHash ()); // don't pick own router
if (m_SSUServer)
{
bool statusChanged = false; bool statusChanged = false;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
@ -694,6 +698,7 @@ namespace transport
} }
if (!statusChanged) if (!statusChanged)
LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv6"); LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv6");
}
// SSU2 // SSU2
if (m_SSU2Server) if (m_SSU2Server)

Loading…
Cancel
Save