flush quues of other paths

This commit is contained in:
Jeff Becker 2019-11-21 09:34:30 -05:00
parent 6f95fbfece
commit 34bc3da069
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 10 additions and 0 deletions

View File

@ -173,6 +173,11 @@ namespace llarp
m_LastActivity = r->Now();
}
FlushDownstream(r);
for(const auto& other : m_FlushOthers)
{
other->FlushUpstream(r);
}
m_FlushOthers.clear();
}
else
{
@ -410,7 +415,10 @@ namespace llarp
buf.cur = buf.base;
// send
if(path->HandleDownstream(buf, msg.Y, r))
{
m_FlushOthers.emplace(path);
return true;
}
return SendRoutingMessage(discarded, r);
}

View File

@ -222,6 +222,8 @@ namespace llarp
void
QueueDestroySelf(AbstractRouter* r);
std::set< HopHandler_ptr, ComparePtr< HopHandler_Ptr > > m_FlushOthers;
};
inline std::ostream&