From 128e7c57a2fc7f6d158b2d3d0d55cf396059d46d Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 22 Feb 2015 08:39:35 +0000 Subject: Tox: tuned disconnecting algorithm git-svn-id: http://svn.miranda-ng.org/main/trunk@12238 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_network.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/Tox') 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(); } -- cgit v1.2.3