diff --git a/packages/django-app/app/core/management/commands/start_discord_bot.py b/packages/django-app/app/core/management/commands/start_discord_bot.py index 4555297..2a7989b 100644 --- a/packages/django-app/app/core/management/commands/start_discord_bot.py +++ b/packages/django-app/app/core/management/commands/start_discord_bot.py @@ -1,5 +1,6 @@ import asyncio +import aiohttp from aiohttp import ClientSession from discord.ext import commands from discordbot.bot import OscarrBot @@ -8,7 +9,8 @@ async def run(): - async with ClientSession() as web_client: + connector = aiohttp.TCPConnector(force_close=True) + async with ClientSession(connector=connector) as web_client: async with OscarrBot( commands.when_mentioned, web_client=web_client,