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:
parent
e1fceb3636
commit
6df133cab2
1 changed files with 2 additions and 2 deletions
|
@ -344,7 +344,7 @@ namespace llarp
|
||||||
auto itr = m_DeadSessions.begin();
|
auto itr = m_DeadSessions.begin();
|
||||||
while(itr != m_DeadSessions.end())
|
while(itr != m_DeadSessions.end())
|
||||||
{
|
{
|
||||||
if(itr->second->IsDone(now) && itr->second->ShouldRemove())
|
if(itr->second->IsDone(now))
|
||||||
itr = m_DeadSessions.erase(itr);
|
itr = m_DeadSessions.erase(itr);
|
||||||
else
|
else
|
||||||
++itr;
|
++itr;
|
||||||
|
@ -394,7 +394,7 @@ namespace llarp
|
||||||
bool
|
bool
|
||||||
Endpoint::OutboundContext::IsDone(llarp_time_t now) const
|
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
|
uint64_t
|
||||||
|
|
Loading…
Reference in a new issue