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:
parent
4f798e9742
commit
6f9123705a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user