mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
[tasks] Fix change_interval raising when called during execution
This commit is contained in:
parent
caa816a636
commit
b308b54b89
@ -692,7 +692,7 @@ class Loop(Generic[LF]):
|
|||||||
self._prepare_time_index(now=self._last_iteration)
|
self._prepare_time_index(now=self._last_iteration)
|
||||||
|
|
||||||
self._next_iteration = self._get_next_sleep_time()
|
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
|
# the loop is sleeping, recalculate based on new interval
|
||||||
self._handle.recalculate(self._next_iteration)
|
self._handle.recalculate(self._next_iteration)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user