mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
cosmetic fix
This commit is contained in:
parent
c9c58074fa
commit
3ea624e1db
@ -350,7 +350,7 @@ namespace data
|
|||||||
std::vector<std::shared_ptr<const RouterInfo> > found;
|
std::vector<std::shared_ptr<const RouterInfo> > found;
|
||||||
const size_t max_iters_per_cyle = 3;
|
const size_t max_iters_per_cyle = 3;
|
||||||
size_t iters = max_iters_per_cyle;
|
size_t iters = max_iters_per_cyle;
|
||||||
while(n)
|
while(n > 0)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(m_RouterInfosMutex);
|
std::unique_lock<std::mutex> lock(m_RouterInfosMutex);
|
||||||
uint32_t idx = rand () % m_RouterInfos.size ();
|
uint32_t idx = rand () % m_RouterInfos.size ();
|
||||||
@ -372,6 +372,8 @@ namespace data
|
|||||||
else // not there yet
|
else // not there yet
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
// we have enough
|
||||||
|
if(n == 0) break;
|
||||||
--iters;
|
--iters;
|
||||||
// have we tried enough this cycle ?
|
// have we tried enough this cycle ?
|
||||||
if(!iters) {
|
if(!iters) {
|
||||||
|
Loading…
Reference in New Issue
Block a user