mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
Merge pull request #334 from majestrate/fix-convotag-issue
swap intros should only swap intros
This commit is contained in:
commit
563cdf2c7c
1 changed files with 1 additions and 23 deletions
|
@ -1142,29 +1142,7 @@ namespace llarp
|
|||
Endpoint::OutboundContext::SwapIntros()
|
||||
{
|
||||
remoteIntro = m_NextIntro;
|
||||
// prepare next intro
|
||||
auto now = Now();
|
||||
for(const auto& intro : currentIntroSet.I)
|
||||
{
|
||||
if(intro.ExpiresSoon(now))
|
||||
continue;
|
||||
if(m_BadIntros.find(intro) == m_BadIntros.end()
|
||||
&& remoteIntro.router == intro.router)
|
||||
{
|
||||
m_NextIntro = intro;
|
||||
return;
|
||||
}
|
||||
}
|
||||
for(const auto& intro : currentIntroSet.I)
|
||||
{
|
||||
if(intro.ExpiresSoon(now))
|
||||
continue;
|
||||
if(m_BadIntros.find(intro) == m_BadIntros.end())
|
||||
{
|
||||
m_NextIntro = intro;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_DataHandler->PutIntroFor(currentConvoTag, remoteIntro);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in a new issue