From ac2cda1ffc37c6427a89781e2a4bf3f54410e54d Mon Sep 17 00:00:00 2001 From: Steve C Date: Fri, 12 Apr 2019 16:39:26 -0400 Subject: [PATCH] [tasks] set internal task to None after canceling --- discord/ext/tasks/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index dab4b5ea8..54b872ba3 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -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.