summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Tox/src/tox_network.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp
index 8fa5d85aa5..694d966753 100644
--- a/protocols/Tox/src/tox_network.cpp
+++ b/protocols/Tox/src/tox_network.cpp
@@ -127,9 +127,13 @@ void CToxProto::CheckConnection(int &retriesCount)
}
else
{
- if (retriesCount == TOX_MAX_DISCONNECT_RETRIES - 20)
+ if (retriesCount == TOX_MAX_DISCONNECT_RETRIES)
{
+ retriesCount--;
debugLogA("CToxProto::CheckConnection: lost connection with DHT");
+ }
+ else if (retriesCount % 50 == 0)
+ {
retriesCount--;
BootstrapNodes();
}