diff --git a/core.cpp b/core.cpp index 4744fda90..d73b17683 100644 --- a/core.cpp +++ b/core.cpp @@ -244,9 +244,8 @@ void Core::process() if (checkConnection()) tolerance = CORE_DISCONNECT_TOLERANCE; - else if (--tolerance) + else if (!(--tolerance)) { - tolerance = CORE_DISCONNECT_TOLERANCE; bootstrapDht(); } @@ -285,7 +284,7 @@ void Core::bootstrapDht() qDebug() << "Core: Bootstraping to the DHT ..."; int i=0; - while (i < 3) + while (i < 4) { const Settings::DhtServer& dhtServer = dhtServerList[j % listSize]; if (tox_bootstrap_from_address(tox, dhtServer.address.toLatin1().data(),