mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 06:59:03 +02:00
use the random device for random number generation
This commit is contained in:
parent
b5fe6120aa
commit
f975f480b4
1 changed files with 1 additions and 1 deletions
|
@ -2113,7 +2113,7 @@ void DomainServer::randomizeICEServerAddress() {
|
||||||
int maxIndex = candidateICEAddresses.size();
|
int maxIndex = candidateICEAddresses.size();
|
||||||
|
|
||||||
static std::random_device randomDevice;
|
static std::random_device randomDevice;
|
||||||
static std::mt19937 generator;
|
static std::mt19937 generator(randomDevice());
|
||||||
std::uniform_int_distribution<> distribution(0, maxIndex);
|
std::uniform_int_distribution<> distribution(0, maxIndex);
|
||||||
|
|
||||||
auto indexToTry = distribution(generator);
|
auto indexToTry = distribution(generator);
|
||||||
|
|
Loading…
Reference in a new issue