diff options
Diffstat (limited to 'protocols/Tox/src/tox_network.cpp')
-rw-r--r-- | protocols/Tox/src/tox_network.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp index a734d08ee7..19d90b719b 100644 --- a/protocols/Tox/src/tox_network.cpp +++ b/protocols/Tox/src/tox_network.cpp @@ -80,8 +80,11 @@ void CToxProto::CheckConnection(int &retriesCount) {
if (tox_isconnected(tox))
{
- debugLogA("CToxProto::CheckConnection: restored connection with DHT");
- retriesCount = TOX_MAX_DISCONNECT_RETRIES;
+ if (retriesCount < TOX_MAX_DISCONNECT_RETRIES)
+ {
+ debugLogA("CToxProto::CheckConnection: restored connection with DHT");
+ retriesCount = TOX_MAX_DISCONNECT_RETRIES;
+ }
}
else if (!(--retriesCount))
{
|