Don't disconnect borrowed senders immediately (#1364)

This commit is contained in:
Lonami Exo
2020-04-05 12:34:33 +02:00
parent 3729fde572
commit d0f937bcb6
2 changed files with 76 additions and 19 deletions

View File

@@ -335,6 +335,9 @@ class UpdateMethods:
except Exception:
continue # Any disconnected exception should be ignored
# Check if we have any exported senders to clean-up periodically
await self._clean_exported_senders()
# Don't bother sending pings until the low-level connection is
# ready, otherwise a lot of pings will be batched to be sent upon
# reconnect, when we really don't care about that.