1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(core): Fix logic error retrieving TCP port

Introduced in e7e30ada8c
This commit is contained in:
Anthony Bilinski 2022-02-21 05:19:03 -08:00
parent 4f798e9742
commit 6f9123705a
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -846,7 +846,7 @@ void Core::bootstrapDht()
}
if (dhtServer.statusTcp) {
const auto ports = dhtServer.tcpPorts.size();
const auto tcpPort = rand() % ports;
const auto tcpPort = dhtServer.tcpPorts[rand() % ports];
tox_add_tcp_relay(tox.get(), address.constData(), tcpPort, pkPtr, &error);
PARSE_ERR(error);
}