From aedc57e24d5ff3b7502594f05901171f70e7ca93 Mon Sep 17 00:00:00 2001 From: ToasterUwU Date: Mon, 12 Aug 2024 16:28:50 +0200 Subject: [PATCH] increase timeout to half an hour --- cogs/torrent_creator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/torrent_creator.py b/cogs/torrent_creator.py index 6369c7f..d61c7e4 100644 --- a/cogs/torrent_creator.py +++ b/cogs/torrent_creator.py @@ -58,7 +58,9 @@ async def create_torrent(self, file_url: str): if "?" in filename: filename = filename.split("?", 1)[0] - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession( + timeout=aiohttp.ClientTimeout(total=1800) + ) as session: async with session.get(file_url) as resp: async with aiofiles.open( "./temp/" + filename,