mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
ignore unpublished addresses
This commit is contained in:
parent
11142690a0
commit
863baeb68b
1 changed files with 3 additions and 3 deletions
|
@ -131,8 +131,8 @@ namespace transport
|
||||||
const auto& a = context.GetRouterInfo().GetAddresses();
|
const auto& a = context.GetRouterInfo().GetAddresses();
|
||||||
for (const auto& address : a)
|
for (const auto& address : a)
|
||||||
{
|
{
|
||||||
if (!address->host.is_v6 ())
|
if (!address->host.is_v6 () && address->port)
|
||||||
TryPortMapping (address);
|
TryPortMapping (address);
|
||||||
}
|
}
|
||||||
m_Timer.expires_from_now (boost::posix_time::minutes(20)); // every 20 minutes
|
m_Timer.expires_from_now (boost::posix_time::minutes(20)); // every 20 minutes
|
||||||
m_Timer.async_wait ([this](const boost::system::error_code& ecode)
|
m_Timer.async_wait ([this](const boost::system::error_code& ecode)
|
||||||
|
@ -148,7 +148,7 @@ namespace transport
|
||||||
const auto& a = context.GetRouterInfo().GetAddresses();
|
const auto& a = context.GetRouterInfo().GetAddresses();
|
||||||
for (const auto& address : a)
|
for (const auto& address : a)
|
||||||
{
|
{
|
||||||
if (!address->host.is_v6 ())
|
if (!address->host.is_v6 () && address->port)
|
||||||
CloseMapping (address);
|
CloseMapping (address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue