1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

remove dead sessions when done

This commit is contained in:
Jeff Becker 2019-02-09 09:15:54 -05:00
parent e1fceb3636
commit 6df133cab2
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -344,7 +344,7 @@ namespace llarp
auto itr = m_DeadSessions.begin();
while(itr != m_DeadSessions.end())
{
if(itr->second->IsDone(now) && itr->second->ShouldRemove())
if(itr->second->IsDone(now))
itr = m_DeadSessions.erase(itr);
else
++itr;
@ -394,7 +394,7 @@ namespace llarp
bool
Endpoint::OutboundContext::IsDone(llarp_time_t now) const
{
return now - lastGoodSend > DEFAULT_PATH_LIFETIME && ShouldRemove();
return now - lastGoodSend > (DEFAULT_PATH_LIFETIME / 4) && ShouldRemove();
}
uint64_t