don't send more than 1 introset in reply

pull/294/head
Jeff Becker 5 years ago
parent 732aa3297a
commit d7f715c632
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -31,6 +31,18 @@ namespace llarp
localPath);
return;
}
// pick newest if we have more than 1 result
if(valuesFound.size() > 1)
{
service::IntroSet found;
for(const auto &introset : valuesFound)
{
if(found.OtherIsNewer(introset))
found = introset;
}
valuesFound.clear();
valuesFound.emplace_back(found);
}
routing::DHTMessage msg;
msg.M.emplace_back(new GotIntroMessage(valuesFound, whoasked.txid));
if(!path->SendRoutingMessage(&msg, parent->GetRouter()))

Loading…
Cancel
Save