From 4719ea28a8ce04278981473a9d3d775a4a464a58 Mon Sep 17 00:00:00 2001 From: dubslow Date: Mon, 29 Sep 2014 21:29:39 -0500 Subject: [PATCH] oops, don't reset tolerance upon bootstrap --- core.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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(),