aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
Diffstat (limited to 'discord')
-rw-r--r--discord/ext/tasks/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py
index 240fc42e..d2ae2c75 100644
--- a/discord/ext/tasks/__init__.py
+++ b/discord/ext/tasks/__init__.py
@@ -111,13 +111,13 @@ class Loop:
raise
await asyncio.sleep(backoff.delay())
else:
+ await sleep_until(self._next_iteration)
+
if self._stop_next_iteration:
return
self._current_loop += 1
if self._current_loop == self.count:
break
-
- await sleep_until(self._next_iteration)
except asyncio.CancelledError:
self._is_being_cancelled = True
raise