make more attempts to select not bad hop

This commit is contained in:
Vort 2024-02-20 17:39:48 +02:00
parent cb8fbb0135
commit b092e712ec
3 changed files with 19 additions and 6 deletions

View file

@ -1257,7 +1257,7 @@ namespace data
std::shared_ptr<const RouterInfo> NetDb::GetRandomRouter (Filter filter) const
{
if (m_RouterInfos.empty())
return 0;
return nullptr;
uint16_t inds[3];
RAND_bytes ((uint8_t *)inds, sizeof (inds));
std::lock_guard<std::mutex> l(m_RouterInfosMutex);