Fixed std::random_device usage

This commit is contained in:
SChernykh
2025-04-29 11:07:03 +02:00
parent 9462f2a85b
commit df21dd48af
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -85,9 +85,10 @@ ConsoleCommands::ConsoleCommands(p2pool* pool)
}
std::random_device rd;
std::mt19937_64 rng(rd());
for (int i = 0; i < 10; ++i) {
if (start_listening(false, "127.0.0.1", 49152 + (rd() % 16384))) {
if (start_listening(false, "127.0.0.1", 49152 + (rng() % 16384))) {
break;
}
}