Skip to content

Commit

Permalink
[Discord] Handle ClientConnectionError in Twitter task
Browse files Browse the repository at this point in the history
Instead of ClientOSError, as ServerDisconnectedError does not subclass it as previously indicated in aiohttp's documentation:
aio-libs/aiohttp#7733
  • Loading branch information
Harmon758 committed Oct 21, 2023
1 parent a6523c2 commit 527b469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Discord/cogs/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ async def check_tweets(self):
except discord.DiscordServerError as e:
self.bot.print(f"Twitter Task Discord Server Error: {e}")
await asyncio.sleep(60)
except aiohttp.ClientOSError:
except aiohttp.ClientConnectionError:
# TODO: Log
await asyncio.sleep(1)
except Exception as e:
Expand Down

0 comments on commit 527b469

Please sign in to comment.