Don't set the disconnected flag twice

This commit is contained in:
Lonami Exo 2018-10-19 13:25:00 +02:00
parent e2fe3eb503
commit f5bc952309

View File

@ -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: