From 0330282c5f0419328fa5b5ec5101bccf2903e2cc Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 7 Mar 2022 01:19:37 -0500 Subject: [PATCH] Create a default TCPConnector with no limit The default implementation only allows for 100 concurrent connections and during heavy sharding (>=100 shards) this can end up freezing shards. --- discord/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/http.py b/discord/http.py index 585d67b97..c6c604b34 100644 --- a/discord/http.py +++ b/discord/http.py @@ -324,7 +324,7 @@ class HTTPClient: unsync_clock: bool = True, ) -> None: self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() if loop is None else loop - self.connector = connector + self.connector: aiohttp.BaseConnector = connector or aiohttp.TCPConnector(limit=0) self.__session: aiohttp.ClientSession = MISSING # filled in static_login self._locks: weakref.WeakValueDictionary = weakref.WeakValueDictionary() self._global_over: asyncio.Event = asyncio.Event()