From a6d15dc385ffe047f39b1b61f54a1031f5f0d3dd Mon Sep 17 00:00:00 2001 From: PredaaA <46051820+PredaaA@users.noreply.github.com> Date: Mon, 5 Apr 2021 22:22:20 +0200 Subject: [PATCH] [Streams] Stop suppressing task cancelation in _stream_alerts() (#4940) * Minimize the API calls * Address Jack's review. * [Streams] Actually cancel the _stream_alerts task. --- redbot/cogs/streams/streams.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index 1f1bed471..f9d292325 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -715,10 +715,7 @@ class Streams(commands.Cog): async def _stream_alerts(self): await self.bot.wait_until_ready() while True: - try: - await self.check_streams() - except asyncio.CancelledError: - pass + await self.check_streams() await asyncio.sleep(await self.config.refresh_timer()) async def _send_stream_alert(