mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
check if updated router is still introducer. Remove non-introducer sessions from introducers list
This commit is contained in:
@@ -1104,22 +1104,21 @@ namespace transport
|
||||
session = it1->second;
|
||||
excluded.insert (it);
|
||||
}
|
||||
if (session && session->IsEstablished () && session->GetRelayTag () && session->IsOutgoing ()) // still session with introducer?
|
||||
{
|
||||
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION)
|
||||
if (session && session->IsEstablished () && session->GetRelayTag () && session->IsOutgoing () && // still session with introducer?
|
||||
ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION)
|
||||
{
|
||||
session->SendKeepAlive ();
|
||||
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_DURATION)
|
||||
newList.push_back (it);
|
||||
else
|
||||
{
|
||||
session->SendKeepAlive ();
|
||||
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_DURATION)
|
||||
newList.push_back (it);
|
||||
else
|
||||
{
|
||||
impliedList.push_back (it); // keep in introducers list, but not publish
|
||||
session = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
session = nullptr;
|
||||
}
|
||||
impliedList.push_back (it); // keep in introducers list, but not publish
|
||||
session = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
session = nullptr;
|
||||
|
||||
if (!session)
|
||||
i2p::context.RemoveSSU2Introducer (it, v4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user