diff --git a/CHANGELOG.md b/CHANGELOG.md index f213fbcfc2..78d6fac416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,8 @@ These changes are available on the `master` branch, but have not yet been releas - Fixed attachment metadata being set incorrectly in interaction responses causing the metadata to be ignored by Discord. ([#2679](https://github.com/Pycord-Development/pycord/pull/2679)) +- Fixed unexpected backoff behavior in the handling of task failures + ([#2700](https://github.com/Pycord-Development/pycord/pull/2700)). ### Changed diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 638bd831c6..af34cc6844 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -168,6 +168,7 @@ async def _loop(self, *args: Any, **kwargs: Any) -> None: try: await self.coro(*args, **kwargs) self._last_iteration_failed = False + backoff = ExponentialBackoff() except self._valid_exception: self._last_iteration_failed = True if not self.reconnect: