fix last commit

pull/66/head
Jeff Becker 6 years ago
parent 6866e70a95
commit 4e3089dee4
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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…
Cancel
Save