use exisitng convotag first instead of trying to send to directly

pull/1669/head
Jeff Becker 3 years ago
parent ee5723ecdc
commit 872a8d8045
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1109,10 +1109,13 @@ namespace llarp
}
// try sending it on an existing convotag
// this succeds for inbound convos, probably.
if (SendToOrQueue(to, pkt.ConstBuffer(), type))
if (auto maybe = GetBestConvoTagFor(to))
{
MarkIPActive(dst);
return;
if (SendToOrQueue(*maybe, pkt.ConstBuffer(), type))
{
MarkIPActive(dst);
return;
}
}
// try establishing a path to this guy
// will fail if it's an inbound convo

Loading…
Cancel
Save