1
1
Fork 0
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:
Jeff Becker 2018-09-24 13:13:29 -04:00
parent 83643845c2
commit d298e4f124
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -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;
}