mirror of https://github.com/oxen-io/lokinet
remove our paths from outbound queues
This commit is contained in:
parent
17de3f2478
commit
ef1a5652ef
|
@ -165,7 +165,7 @@ namespace llarp
|
|||
void Builder::Tick(llarp_time_t)
|
||||
{
|
||||
const auto now = llarp::time_now_ms();
|
||||
ExpirePaths(now);
|
||||
ExpirePaths(now, m_router);
|
||||
if(ShouldBuildMore(now))
|
||||
BuildOne();
|
||||
TickPaths(m_router);
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace llarp
|
|||
}
|
||||
|
||||
void
|
||||
PathSet::ExpirePaths(llarp_time_t now)
|
||||
PathSet::ExpirePaths(llarp_time_t now, AbstractRouter* router)
|
||||
{
|
||||
Lock_t l(&m_PathsMutex);
|
||||
if(m_Paths.size() == 0)
|
||||
|
@ -83,6 +83,7 @@ namespace llarp
|
|||
{
|
||||
if(itr->second->Expired(now))
|
||||
{
|
||||
router->outboundMessageHandler().QueueRemoveEmptyPath(itr->second->TXID());
|
||||
itr = m_Paths.erase(itr);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace llarp
|
|||
GetByUpstream(RouterID remote, PathID_t rxid) const;
|
||||
|
||||
void
|
||||
ExpirePaths(llarp_time_t now);
|
||||
ExpirePaths(llarp_time_t now, AbstractRouter* router);
|
||||
|
||||
/// get the number of paths in this status
|
||||
size_t
|
||||
|
|
Loading…
Reference in New Issue