mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 13:11:40 +00:00
postpone reading from file and updating router profile
This commit is contained in:
1 parent
b6319d78bf
commit
c600b834e3
5 files changed
+86
-14
No files matched your search
+10
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user