mirror of https://github.com/oxen-io/lokinet
expunge outbound contexts that have not gotten inbound traffic for a long while
This commit is contained in:
parent
32a94c73e2
commit
e7ac0f3902
|
@ -404,6 +404,10 @@ namespace llarp
|
|||
m_ReadyHooks.clear();
|
||||
}
|
||||
|
||||
if (m_LastInboundTraffic > 0s and lastGoodSend > 0s
|
||||
and now >= sendTimeout + m_LastInboundTraffic)
|
||||
return true;
|
||||
|
||||
const auto timeout = std::max(lastGoodSend, m_LastInboundTraffic);
|
||||
if (lastGoodSend > 0s and now >= timeout + (sendTimeout / 2))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue