use std::min

pull/741/head
Jeff Becker 5 years ago
parent f4ac918b7e
commit 7e9ef19f69
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -666,7 +666,7 @@ namespace llarp
// requester is likely in the connected list
// 4 or connection nodes (minus a potential requestor), whatever is less
if(!_nodes->GetManyNearExcluding(t, foundRouters,
nodeCount >= 4 ? 4 : nodeCount,
std::min(nodeCount, size_t{4}),
std::set< Key_t >{ourKey, requester}))
{
llarp::LogError(

Loading…
Cancel
Save