diff --git a/src/core/core.cpp b/src/core/core.cpp index 79563104e..7ebcc39ed 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -425,7 +425,7 @@ void Core::bootstrapDht() { const Settings::DhtServer& dhtServer = dhtServerList[j % listSize]; if (tox_bootstrap(tox, dhtServer.address.toLatin1().data(), - dhtServer.port, CUserId(dhtServer.userId).data(), nullptr) == 1) + dhtServer.port, CUserId(dhtServer.userId).data(), nullptr)) { qDebug() << "Bootstrapping from " + dhtServer.name + ", addr " + dhtServer.address.toLatin1().data() @@ -436,6 +436,18 @@ void Core::bootstrapDht() qDebug() << "Error bootstrapping from "+dhtServer.name; } + if (tox_add_tcp_relay(tox, dhtServer.address.toLatin1().data(), + dhtServer.port, CUserId(dhtServer.userId).data(), nullptr)) + { + qDebug() << "Adding TCP relay from " + dhtServer.name + + ", addr " + dhtServer.address.toLatin1().data() + + ", port " + QString().setNum(dhtServer.port); + } + else + { + qDebug() << "Error adding TCP relay from "+dhtServer.name; + } + j++; i++; }