Start reconnect if a second ping is sent without a pong for the first

May help with #1564.
This commit is contained in:
Lonami Exo
2020-12-11 17:18:25 +01:00
parent 0a4d54fca4
commit becfe2ce7a
2 changed files with 21 additions and 4 deletions

View File

@@ -348,7 +348,7 @@ class UpdateMethods:
# We also don't really care about their result.
# Just send them periodically.
try:
self._sender.send(functions.PingRequest(rnd()))
self._sender._keepalive_ping(rnd())
except (ConnectionError, asyncio.CancelledError):
return
@@ -399,7 +399,7 @@ class UpdateMethods:
pass
except ValueError:
# There is a chance that GetFullChannelRequest and GetDifferenceRequest
# inside the _get_difference() function will end up with
# inside the _get_difference() function will end up with
# ValueError("Request was unsuccessful N time(s)") for whatever reasons.
pass