diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-02-22 08:39:35 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-02-22 08:39:35 +0000 |
commit | 128e7c57a2fc7f6d158b2d3d0d55cf396059d46d (patch) | |
tree | 1b72b92caca95dd34d6c9847e8da17557c0a4a3c /protocols/Tox | |
parent | 808957a884ac8195484c2a7a662b99cc7a163b86 (diff) |
Tox: tuned disconnecting algorithm
git-svn-id: http://svn.miranda-ng.org/main/trunk@12238 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_network.cpp | 6 |
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();
}
|