From 603681940fedf9f5640217f369352557e104d736 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 13 Mar 2022 22:51:10 -0400 Subject: [PATCH] [tasks] Only correct for clock drift if an explicit time is given --- discord/ext/tasks/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 83f08ee3b..32fd9009b 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -223,7 +223,7 @@ class Loop(Generic[LF]): # the next iteration always follows the last iteration. # Sometimes asyncio is cheeky and wakes up a few microseconds before our target # time, causing it to repeat a run. - while self._next_iteration <= self._last_iteration: + while self._is_explicit_time() and self._next_iteration <= self._last_iteration: _log.warn( ( 'Clock drift detected for task %s. Woke up at %s but needed to sleep until %s. '