mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
remove introducer from RouterInfo after 60 minutes
This commit is contained in:
parent
2064504cce
commit
ae5239de43
1 changed files with 10 additions and 7 deletions
|
@ -997,16 +997,19 @@ namespace transport
|
||||||
}
|
}
|
||||||
if (session && session->IsEstablished ())
|
if (session && session->IsEstablished ())
|
||||||
{
|
{
|
||||||
|
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION)
|
||||||
|
{
|
||||||
|
session->SendKeepAlive ();
|
||||||
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_DURATION)
|
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_DURATION)
|
||||||
newList.push_back (it);
|
newList.push_back (it);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION)
|
|
||||||
impliedList.push_back (it); // keep in introducers list, but not publish
|
impliedList.push_back (it); // keep in introducers list, but not publish
|
||||||
else
|
|
||||||
session = nullptr;
|
session = nullptr;
|
||||||
}
|
}
|
||||||
if (session) session->SendKeepAlive ();
|
}
|
||||||
|
else
|
||||||
|
session = nullptr;
|
||||||
}
|
}
|
||||||
if (!session)
|
if (!session)
|
||||||
i2p::context.RemoveSSU2Introducer (it, v4);
|
i2p::context.RemoveSSU2Introducer (it, v4);
|
||||||
|
|
Loading…
Add table
Reference in a new issue