Browse Source

fix(core): Fix logic error retrieving TCP port

Introduced in e7e30ada8c
reviewable/pr6491/r1
Anthony Bilinski 4 years ago
parent
commit
6f9123705a
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/core/core.cpp

2
src/core/core.cpp

@ -846,7 +846,7 @@ void Core::bootstrapDht() @@ -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…
Cancel
Save