mirror of https://github.com/oxen-io/lokinet
fix last commit
This commit is contained in:
parent
6866e70a95
commit
4e3089dee4
|
@ -22,7 +22,8 @@ namespace llarp
|
|||
bool
|
||||
BaseSession::ShouldBuildMore(llarp_time_t now) const
|
||||
{
|
||||
return AvailablePaths(llarp::path::ePathRoleExit) == 0;
|
||||
return AvailablePaths(llarp::path::ePathRoleExit) == 0
|
||||
|| path::Builder::ShouldBuildMore(now);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -150,6 +150,21 @@ namespace llarp
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
size_t
|
||||
PathSet::AvailablePaths(PathRole roles) const
|
||||
{
|
||||
size_t count = 0;
|
||||
auto itr = m_Paths.begin();
|
||||
while(itr != m_Paths.end())
|
||||
{
|
||||
if(itr->second->Status() == ePathEstablished
|
||||
&& itr->second->SupportsRoles(roles))
|
||||
++count;
|
||||
++itr;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
size_t
|
||||
PathSet::NumInStatus(PathStatus st) const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue