[tasks] set internal task to None after canceling
This commit is contained in:
parent
d15a0f541b
commit
ac2cda1ffc
@ -132,6 +132,7 @@ class Loop:
|
|||||||
"""Cancels the internal task, if any are running."""
|
"""Cancels the internal task, if any are running."""
|
||||||
if self._task:
|
if self._task:
|
||||||
self._task.cancel()
|
self._task.cancel()
|
||||||
|
self._task = None
|
||||||
|
|
||||||
def add_exception_type(self, exc):
|
def add_exception_type(self, exc):
|
||||||
r"""Adds an exception type to be handled during the reconnect logic.
|
r"""Adds an exception type to be handled during the reconnect logic.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user