mirror of https://github.com/oxen-io/lokinet
fix transit hop job queuing
This commit is contained in:
parent
bb14b44bcf
commit
fe1dae8f30
|
@ -252,11 +252,11 @@ namespace llarp
|
|||
{
|
||||
if (m_UpstreamQueue && not m_UpstreamQueue->empty())
|
||||
{
|
||||
if (r->threadpool()->addJob(std::bind(
|
||||
&TransitHop::UpstreamWork, shared_from_this(), std::move(m_UpstreamQueue), r)))
|
||||
{
|
||||
m_UpstreamWorkCounter++;
|
||||
}
|
||||
m_UpstreamWorkCounter++;
|
||||
|
||||
r->threadpool()->addJob([self = shared_from_this(),
|
||||
data = std::move(m_UpstreamQueue),
|
||||
r]() { self->UpstreamWork(data, r); });
|
||||
}
|
||||
m_UpstreamQueue = nullptr;
|
||||
}
|
||||
|
@ -266,11 +266,11 @@ namespace llarp
|
|||
{
|
||||
if (m_DownstreamQueue && not m_DownstreamQueue->empty())
|
||||
{
|
||||
if (r->threadpool()->addJob(std::bind(
|
||||
&TransitHop::DownstreamWork, shared_from_this(), std::move(m_DownstreamQueue), r)))
|
||||
{
|
||||
m_DownstreamWorkCounter++;
|
||||
}
|
||||
m_DownstreamWorkCounter++;
|
||||
|
||||
r->threadpool()->addJob([self = shared_from_this(),
|
||||
data = std::move(m_UpstreamQueue),
|
||||
r]() { self->DownstreamWork(data, r); });
|
||||
}
|
||||
m_DownstreamQueue = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue