Skip to content

Commit

Permalink
fixed send keepalive for existing session
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jul 23, 2023
1 parent 4aa631c commit 2064504
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libi2pd/SSU2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,17 +997,16 @@ namespace transport
}
if (session && session->IsEstablished ())
{
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_DURATION)
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_DURATION)
newList.push_back (it);
else
{
if (ts < session->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION)
{
impliedList.push_back (it); // keep in introducers list, but not publish
session->SendKeepAlive ();
}
session = nullptr;
}
else
session = nullptr;
}
if (session) session->SendKeepAlive ();
}
if (!session)
i2p::context.RemoveSSU2Introducer (it, v4);
Expand Down

0 comments on commit 2064504

Please sign in to comment.