Browse Source
[tasks] Fix change_interval raising when called during execution
pull/7587/head
Lilly Rose Berner
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
discord/ext/tasks/__init__.py
|
|
@ -692,7 +692,7 @@ class Loop(Generic[LF]): |
|
|
|
self._prepare_time_index(now=self._last_iteration) |
|
|
|
|
|
|
|
self._next_iteration = self._get_next_sleep_time() |
|
|
|
if not self._handle.done(): |
|
|
|
if self._handle is not MISSING and not self._handle.done(): |
|
|
|
# the loop is sleeping, recalculate based on new interval |
|
|
|
self._handle.recalculate(self._next_iteration) |
|
|
|
|
|
|
|