Shield disconnected Future in the MTProtoSender instead

This commit is contained in:
Lonami Exo
2018-06-18 15:55:24 +02:00
parent efc48ee3b0
commit 51d8ea0fa8
2 changed files with 2 additions and 4 deletions

View File

@@ -214,7 +214,7 @@ class MTProtoSender:
ends, either by user action or in the background.
"""
if self._disconnected is not None:
return self._disconnected
return asyncio.shield(self._disconnected, loop=self._loop)
else:
raise ConnectionError('Sender was never connected')