[Streams] Stop suppressing task cancelation in _stream_alerts() (#4940)

* Minimize the API calls

* Address Jack's review.

* [Streams] Actually cancel the _stream_alerts task.
This commit is contained in:
PredaaA 2021-04-05 22:22:20 +02:00 committed by GitHub
parent 07099dd1dd
commit a6d15dc385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -715,10 +715,7 @@ class Streams(commands.Cog):
async def _stream_alerts(self): async def _stream_alerts(self):
await self.bot.wait_until_ready() await self.bot.wait_until_ready()
while True: while True:
try:
await self.check_streams() await self.check_streams()
except asyncio.CancelledError:
pass
await asyncio.sleep(await self.config.refresh_timer()) await asyncio.sleep(await self.config.refresh_timer())
async def _send_stream_alert( async def _send_stream_alert(