mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Don't set the disconnected flag twice
This commit is contained in:
parent
e2fe3eb503
commit
f5bc952309
|
@ -87,6 +87,7 @@ class Connection(abc.ABC):
|
|||
self._disconnect(error=None)
|
||||
|
||||
def _disconnect(self, error):
|
||||
if not self._disconnected.done():
|
||||
if error:
|
||||
self._disconnected.set_exception(error)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user