try not to spam builds

This commit is contained in:
Jeff 2022-04-01 00:10:02 -04:00
parent 619d8d3776
commit af041cfee4
1 changed files with 2 additions and 1 deletions

View File

@ -479,7 +479,8 @@ namespace llarp
{
if (markedBad or path::Builder::BuildCooldownHit(now))
return false;
if (NumInStatus(path::ePathBuilding) >= numDesiredPaths)
if (NumInStatus(path::ePathBuilding) >= std::max(numDesiredPaths / size_t{2}, size_t{1}))
return false;
size_t numValidPaths = 0;