[tasks] set internal task to None after canceling

This commit is contained in:
Steve C 2019-04-12 16:39:26 -04:00 committed by Rapptz
parent d15a0f541b
commit ac2cda1ffc

View File

@ -132,6 +132,7 @@ class Loop:
"""Cancels the internal task, if any are running."""
if self._task:
self._task.cancel()
self._task = None
def add_exception_type(self, exc):
r"""Adds an exception type to be handled during the reconnect logic.