mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
use intros only if they don't expire soon
This commit is contained in:
parent
83643845c2
commit
d298e4f124
1 changed files with 3 additions and 2 deletions
|
@ -105,7 +105,7 @@ namespace llarp
|
|||
m_IntroSet.I.clear();
|
||||
for(const auto& intro : I)
|
||||
{
|
||||
if(!intro.ExpiresSoon(now))
|
||||
if(now < intro.expiresAt && intro.expiresAt - now > 10000)
|
||||
m_IntroSet.I.push_back(intro);
|
||||
}
|
||||
if(m_IntroSet.I.size() == 0)
|
||||
|
@ -972,7 +972,8 @@ namespace llarp
|
|||
{
|
||||
llarp::LogDebug(Name(), " has session to ", remote, " sending ",
|
||||
data.sz, " bytes");
|
||||
m_RemoteSessions[remote]->AsyncEncryptAndSendTo(data, t);
|
||||
auto itr = m_RemoteSessions.find(remote);
|
||||
itr->second->AsyncEncryptAndSendTo(data, t);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue