mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
check if remote RouterInfo is presented
This commit is contained in:
parent
f8481b70eb
commit
11a1201506
@ -98,7 +98,7 @@ namespace i2p
|
|||||||
if (ret)
|
if (ret)
|
||||||
UpdateRouterInfo ();
|
UpdateRouterInfo ();
|
||||||
}
|
}
|
||||||
return true;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RouterContext::RemoveIntroducer (const boost::asio::ip::udp::endpoint& e)
|
void RouterContext::RemoveIntroducer (const boost::asio::ip::udp::endpoint& e)
|
||||||
|
8
SSU.cpp
8
SSU.cpp
@ -1086,11 +1086,6 @@ namespace ssu
|
|||||||
{
|
{
|
||||||
session->Close ();
|
session->Close ();
|
||||||
m_Sessions.erase (session->GetRemoteEndpoint ());
|
m_Sessions.erase (session->GetRemoteEndpoint ());
|
||||||
if (session->GetRelayTag () && i2p::context.GetRouterInfo ().UsesIntroducer ())
|
|
||||||
{
|
|
||||||
m_Introducers.remove (session->GetRemoteEndpoint ());
|
|
||||||
i2p::context.RemoveIntroducer (session->GetRemoteEndpoint ());
|
|
||||||
}
|
|
||||||
delete session;
|
delete session;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1189,7 +1184,8 @@ namespace ssu
|
|||||||
{
|
{
|
||||||
for (auto it1: introducers)
|
for (auto it1: introducers)
|
||||||
{
|
{
|
||||||
if (i2p::context.AddIntroducer (*it1->GetRemoteRouter (), it1->GetRelayTag ()))
|
auto router = it1->GetRemoteRouter ();
|
||||||
|
if (router && i2p::context.AddIntroducer (*router, it1->GetRelayTag ()))
|
||||||
{
|
{
|
||||||
newList.push_back (it1->GetRemoteEndpoint ());
|
newList.push_back (it1->GetRemoteEndpoint ());
|
||||||
if (newList.size () >= SSU_MAX_NUM_INTRODUCERS) break;
|
if (newList.size () >= SSU_MAX_NUM_INTRODUCERS) break;
|
||||||
|
Loading…
Reference in New Issue
Block a user