postpone reading from file and updating router profile

This commit is contained in:
orignal committed 2025-01-18 18:26:16 -05:00
1 parent b6319d78bf
commit c600b834e3
5 files changed
+86 -14

No files matched your search

+10 -1
View File
@@ -1206,7 +1206,16 @@ namespace transport
return false;
}
if (!m_Address->published)
ri->GetProfile ()->SetLastEndpoint (m_RemoteEndpoint);
{
if (ri->HasProfile ())
ri->GetProfile ()->SetLastEndpoint (m_RemoteEndpoint);
else
i2p::data::UpdateRouterProfile (ri->GetIdentHash (),
[ep = m_RemoteEndpoint](std::shared_ptr<i2p::data::RouterProfile> profile)
{
if (profile) profile->SetLastEndpoint (ep);
});
}
SetRemoteIdentity (ri->GetRouterIdentity ());
AdjustMaxPayloadSize ();
m_Server.AddSessionByRouterHash (shared_from_this ()); // we know remote router now