1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

delay setting sentIntro by the advertised latency of the remote intro instead of static value

This commit is contained in:
Jeff Becker 2021-06-03 10:32:36 -04:00
parent c5a86a49a3
commit 220b8837da
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -239,7 +239,8 @@ namespace llarp
ex->hook = [self = shared_from_this(), path](auto frame) {
if (not self->Send(std::move(frame), path))
return;
self->m_Endpoint->Loop()->call_later(100ms, [self]() { self->sentIntro = true; });
self->m_Endpoint->Loop()->call_later(
self->remoteIntro.latency, [self]() { self->sentIntro = true; });
};
ex->msg.PutBuffer(payload);