queue pending traffic

pull/576/head
Jeff Becker 5 years ago
parent bb47d612b3
commit cde4fcc00a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1121,12 +1121,18 @@ namespace llarp
++itr;
}
}
m_PendingTraffic[remote].emplace_back(data, t);
// no converstation
return EnsurePathToService(
remote,
[](Address, OutboundContext* c) {
[&](Address r, OutboundContext* c) {
if(c)
{
c->UpdateIntroSet(true);
for(auto & pending : m_PendingTraffic[r] )
c->AsyncEncryptAndSendTo(pending.Buffer(), pending.protocol);
}
m_PendingTraffic.erase(r);
},
5000, true);
}

@ -215,7 +215,7 @@ namespace llarp
bool
CheckPathIsDead(path::Path_ptr p, llarp_time_t latency);
using PendingBufferQueue = std::queue< PendingBuffer >;
using PendingBufferQueue = std::deque< PendingBuffer >;
bool
ShouldBundleRC() const override;

@ -90,6 +90,7 @@ namespace llarp
auto itr = remoteSessions.begin();
while(itr != remoteSessions.end())
{
itr->second->Tick(now);
if(itr->second->Pump(now))
{
itr->second->Stop();

Loading…
Cancel
Save